2. Data Representation: Questions and Answers

Select a question to reveal its answer.

Part AMultiple Choice Questions

1Computers can understand only:
  • a) decimal digits
  • b) binary digits (0 and 1)
  • c) hexadecimal digits
  • d) octal digits
Answer

b) binary digits (0 and 1)

So all data (numbers, characters, images, audio, video) must be converted to binary form.

2The base (radix) of the octal number system is:
  • a) 2
  • b) 8
  • c) 10
  • d) 16
Answer

b) 8

3In the hexadecimal system, the letter F represents:
  • a) 10
  • b) 14
  • c) 15
  • d) 16
Answer

c) 15

A=10, B=11, C=12, D=13, E=14, F=15.

4A number system in which the value of a digit depends on its position is called:
  • a) non-positional
  • b) positional
  • c) symbolic
  • d) complementary
Answer

b) positional

5(1001011)2 in decimal is:
  • a) 57
  • b) 65
  • c) 75
  • d) 85
Answer

c) 75

64 + 8 + 2 + 1 = 75

6The 3-bit binary equivalent of the octal digit 5 is:
  • a) 101
  • b) 110
  • c) 011
  • d) 111
Answer

a) 101

7In binary addition, 1 + 1 gives:
  • a) Sum 1, Carry 0
  • b) Sum 0, Carry 1
  • c) Sum 1, Carry 1
  • d) Sum 0, Carry 0
Answer

b) Sum 0, Carry 1

8(1101)2 + (0011)2 =
  • a) (1110)2
  • b) (10000)2
  • c) (10001)2
  • d) (1111)2
Answer

b) (10000)2

13 + 3 = 16

9In sign and magnitude representation, the sign bit 1 indicates:
  • a) positive number
  • b) negative number
  • c) zero
  • d) overflow
Answer

b) negative number

0 indicates a positive number.

10The 1's complement of 01010111 is:
  • a) 10101000
  • b) 10101001
  • c) 01010111
  • d) 11111111
Answer

a) 10101000

11Which method is most commonly used by computers to represent negative integers?
  • a) Sign and magnitude
  • b) 1's complement
  • c) 2's complement
  • d) Floating point
Answer

c) 2's complement

12A number with an integer part and a fractional part is called a:
  • a) natural number
  • b) floating point number
  • c) octal number
  • d) word
Answer

b) floating point number

13ASCII uses how many bits per character?
  • a) 5 bits
  • b) 7 bits
  • c) 16 bits
  • d) 32 bits
Answer

b) 7 bits

This gives 2^7 = 128 characters.

14The Unicode standard is maintained by:
  • a) ANSI
  • b) IBM
  • c) Unicode Consortium
  • d) Microsoft
Answer

c) Unicode Consortium

It is a non-profit organization.

15The smallest dot that makes up a digital image is called a:
  • a) pixel
  • b) frame
  • c) byte
  • d) sample
Answer

a) pixel

16Which image format uses lossless compression and supports transparency but not animation?
  • a) JPEG
  • b) PNG
  • c) GIF
  • d) BMP
Answer

b) PNG

17Which audio format stores sound in uncompressed form?
  • a) MP3
  • b) AAC
  • c) WAV
  • d) OGG
Answer

c) WAV

18The converting of analog sound signals into digital signals is called:
  • a) compression
  • b) digitization
  • c) encryption
  • d) decoding
Answer

b) digitization

19A video usually plays at how many frames per second (fps)?
  • a) 1 to 5
  • b) 10 to 15
  • c) 24 to 60
  • d) 100 to 200
Answer

c) 24 to 60

20Which image format is limited to 256 colours and supports animation?
  • a) BMP
  • b) TIFF
  • c) PNG
  • d) GIF
Answer

d) GIF

Part BFill in the Blanks

1The number of symbols used in a number system is called its ______.
Answer

Base or radix.

2The word 'decimal' comes from the Latin word ______, which means ten.
Answer

Decem.

3The rightmost digit of a decimal number is called the ______ and the leftmost is called the ______.
Answer

Least Significant Digit (LSD); Most Significant Digit (MSD).

4The binary number system is also called the base-______ number system.
Answer

2.

5The octal number system uses the digits 0 to ______.
Answer

7.

6In the hexadecimal system, A represents ______ and B represents ______.
Answer

10; 11.

7To convert a decimal number to binary, divide repeatedly by ______ and read the remainders from ______ to ______.
Answer

2; bottom to top.

8Each octal digit is converted into ______ bits and each hexadecimal digit into ______ bits.
Answer

3 bits; 4 bits.

9The 2's complement of a number is its 1's complement plus ______.
Answer

1.

10A group of fixed-size bits handled as a unit by a processor is called a ______.
Answer

Word. The number of bits in it is the word length.

11A floating point number has two parts: the ______ and the ______.
Answer

Mantissa and exponent.

12ASCII stands for ______.
Answer

American Standard Code for Information Interchange.

13Each pixel's colour in the RGB model is stored using ______ bits.
Answer

24 bits (8 bits each for Red, Green and Blue).

14______ lossy compression is used by JPEG, while PNG uses ______ compression.
Answer

JPEG uses lossy compression; PNG uses lossless compression.

15A video is made up of a series of still images called ______.
Answer

Frames.

Part CMatch the Following

1Match the number systems with their bases.
Column AColumn B
1. Decimala) 2
2. Binaryb) 16
3. Octalc) 8
4. Hexadecimald) 10
Answer
Number systemBase
1. Decimald) 10
2. Binarya) 2
3. Octalc) 8
4. Hexadecimalb) 16
2Match the encoding methods with the number of bits they use.
Column AColumn B
1. ASCIIa) 16-32 bits
2. Extended ASCIIb) 7 bits
3. Unicodec) 8 bits
Answer
EncodingBits
1. ASCIIb) 7 bits
2. Extended ASCIIc) 8 bits
3. Unicodea) 16-32 bits
3Match the image formats with their features.
Column AColumn B
1. BMPa) Lossy compression, photos
2. JPEGb) 256 colours, animation
3. PNGc) Uncompressed, large size
4. GIFd) Lossless, transparency
5. TIFFe) Professional use, lossy and lossless
Answer
FormatFeature
1. BMPc) Uncompressed, large size
2. JPEGa) Lossy compression, photos
3. PNGd) Lossless, transparency
4. GIFb) 256 colours, animation
5. TIFFe) Professional use, lossy and lossless
4Match the audio formats with their features.
Column AColumn B
1. WAVa) Lossless, archiving
2. MP3b) Open-source, used in games
3. FLACc) Uncompressed, studio recording
4. OGGd) Lossy, widely compatible
Answer
FormatFeature
1. WAVc) Uncompressed, studio recording
2. MP3d) Lossy, widely compatible
3. FLACa) Lossless, archiving
4. OGGb) Open-source, used in games
5Match the video formats with their developers.
Column AColumn B
1. AVIa) Apple
2. MOVb) Google
3. FLVc) Microsoft
4. WebMd) Adobe
Answer
FormatDeveloper
1. AVIc) Microsoft
2. MOVa) Apple
3. FLVd) Adobe
4. WebMb) Google

Part DShort Answer Questions

1What do you mean by number system? List any four number systems.
Answer

A number system is a way of writing and representing numbers using a set of symbols or digits, based on value and base. Four number systems: decimal (base 10), binary (base 2), octal (base 8) and hexadecimal (base 16).

2Define the term base (radix) of a number system.
Answer

The number of symbols (digits) used in a number system is called its base or radix. For example, the decimal system uses 10 symbols (0 to 9), so its base is 10.

3What are MSB and LSB in the binary number system?
Answer
  • LSB (Least Significant Bit): the rightmost bit of a binary number.
  • MSB (Most Significant Bit): the leftmost bit of a binary number.
4Why do we use the binary number system in computers?
Answer

Computers are built from millions or billions of tiny electronic switches called transistors, which have only two states: ON (high voltage, 1) and OFF (low voltage, 0). This makes binary the simplest, most reliable and error-resistant way to represent data. Using more states (like the 10 digits of decimal) would need precise voltage levels that are hard to maintain because of electrical noise, heat or signal degradation, causing frequent errors.

5Write a short note on the importance of the hexadecimal number system.
Answer

Hexadecimal uses 16 symbols (0-9 and A-F, where A=10 to F=15). It is useful in computing because it gives a compact, human-friendly way to read and write binary values. Each hex digit stands for exactly 4 bits, so conversion to and from binary is easy.

6List some applications of binary numbers.
Answer
  • Computer language: binary is the native language of computers; all data and instructions are binary codes.
  • Digital electronics: represents digital signals in circuits, the backbone of digital technology.
  • Efficient data storage: used to store data in computers.
  • Encryption: securing data by converting information into binary form.
7Why is the octal system useful? Give its uses.
Answer

Octal is more compact than binary, so it is easier to read, and it converts easily to and from binary. It is used to represent file permissions in Unix-like operating systems, memory addresses in some computer systems, and in embedded systems like microcontrollers for programming and debugging.

8What is a positional number system? Explain with an example.
Answer

A number system in which the value of a digit depends on its position is a positional number system. Each position represents a power of the base, starting from base^0 at the rightmost. Example: 534 = 5x10^2 + 3x10^1 + 4x10^0 = 500 + 30 + 4. Here 5 has the largest place value (100) and 4 has the smallest (1).

9Name the common integer representation methods.
Answer
  1. Sign and magnitude representation
  2. 1's complement representation
  3. 2's complement representation
10Explain sign and magnitude representation with an example.
Answer

The MSB is the sign bit (0 = positive, 1 = negative) and the remaining 7 bits (in an 8-bit word) hold the magnitude. To represent -25: magnitude 25 = 0011001; sign is negative so MSB = 1; result = 10011001.

11Explain 1's complement representation with an example.
Answer

A negative number is formed by changing all 0s to 1s and all 1s to 0s in the 8-bit binary form of the positive number. Example: 87 = 01010111, so -87 = 10101000.

12Explain 2's complement representation with an example.
Answer

It is the most commonly used method for negative integers. Convert the absolute value to 8-bit binary, find the 1's complement, then add 1. Example: 25 = 00011001; 1's complement = 11100110; add 1 gives 11100111, so -25 = 11100111. Complement methods are used only for representing negative integers.

13What is a word and word length?
Answer

A word is a group of bits of fixed size handled as a unit by a processor. The number of bits in a word is the word length. Popular word lengths are 8, 16, 32 and 64.

14What is a floating point number? What are its two parts?
Answer

A number with both an integer part and a fractional part is a floating point number. It has a mantissa (the actual number, normalised, e.g. 0.134) and an exponent (how many places the point moves, like scientific notation; computers use powers of 2). Example: 13.4 = 0.134 x 10^2, with mantissa 134 and exponent 2.

15Write the rules of binary addition.
Answer
ABSumCarry
0000
0110
1010
1101
16What is ASCII? Give its merits and demerits.
Answer

ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents letters, numbers and symbols using 7-bit codes (128 characters). It was first published in 1963 by the American Standards Association. IBM popularised 8-bit encodings called Extended ASCII. Merits: simple and efficient, widely supported and compatible. Demerit: limited character set; does not adequately support multiple languages, special characters or symbols.

17What is Unicode? Give its merits.
Answer

Unicode is a standard character encoding scheme that is universal, efficient, uniform and unambiguous, introduced because ASCII (7-bit) and Extended ASCII (8-bit, 256 characters) cannot represent characters of all scripts. It is maintained by the Unicode Consortium, defines up to 1,114,112 code points and is commonly encoded as UTF-8, UTF-16 or UTF-32. Merits: universal language support, platform independence, simplified application development and efficient data sharing.

18Compare ASCII, Extended ASCII and Unicode.
Answer
EncodingBitsCharacter rangeUsed forLimitation
ASCII7 bits2^7 = 128English text, control codesLimited characters
Extended ASCII8 bits2^8 = 256European charactersNot global
Unicode16-32 bits2^8 to 2^32Global language supportRequires more storage
19How is an image represented in a computer?
Answer

An image is stored as a collection of tiny dots called pixels. Each pixel's colour and brightness is converted into binary data. Colours use the RGB model (Red, Green, Blue), each component from 0 to 255, so each pixel's colour takes 24 bits (8 bits each for R, G and B). A digital image has a header section (file format, width, height, colour depth, compression type), pixel data (the binary colour values) and metadata (date, camera settings, author, GPS location).

20How many pixels are there in an HD image of 1920 x 1080 resolution?
Answer

1920 x 1080 = 2,073,600 pixels.

21Differentiate between lossy and lossless compression.
Answer
Lossy compressionLossless compression
Removes certain dataRemoves only redundant data; nothing is discarded
Significant reduction in file sizeModerate reduction in file size
Original cannot be fully restoredOriginal is reconstructed by decompression with no quality loss
Example: JPEG, MP3Example: PNG, FLAC
22Compare the popular image file formats.
Answer
FormatCompressionTransparencyAnimationQualityFile sizeCommon use
BMPUncompressedNoNoExcellentVery largeWindows apps, raw image storage
JPEGLossyNoNoGoodSmallPhotos, web images
PNGLosslessYesNoExcellentModerateLogos, transparent images
GIFLosslessYesYesLow (256 colours)SmallAnimations, web graphics
TIFFLossless / lossyYesYesExcellentVery largeProfessional design
23What is digitization of audio?
Answer

Natural sound waves are analog signals. Since computers understand only binary, analog signals are converted into digital signals. This process is called digitization.

24Compare the popular audio file formats.
Answer
FormatCompressionQualityFile sizeCommon usesSpecial feature
WAVUncompressedExcellentVery largeStudio recording, editingOriginal sound data
MP3LossyGoodSmallMusic, streamingWidely compatible
AACLossyBetter than MP3SmallStreaming, Apple devicesHigh efficiency
FLACLosslessExcellentMediumArchiving, audio editingRetains quality
OGGLossyGoodSmallGaming, streamingOpen-source
WMALossy / losslessGood to excellentSmall to mediumWindows appsMicrosoft format
25How is a video represented in a computer?
Answer

A video is a series of still images called frames, shown quickly (usually 24 to 60 frames per second) along with sound, creating the illusion of motion. Each frame is stored digitally, often in RGB colour format. Videos are compressed to reduce file size, and audio tracks are synchronised with the frames. The compressed video and audio streams are stored together in a single file container such as MP4, AVI or MOV.

26Compare the popular video file formats.
Answer
FormatDeveloperCompressionQualityFile sizeCompatibilityCommon uses
AVIMicrosoftLossy / losslessExcellentVery largeWindowsEditing, archiving
MP4MPEGLossyHighSmallUniversalWeb, mobile, streaming
MKVOpen sourceLossy / losslessVery highMediumWide software supportMovies, HD videos
MOVAppleLossyExcellentLargemacOSProfessional editing
FLVAdobeLossyGoodSmallBrowser dependent, decliningOld online streaming
WMVMicrosoftLossyGoodSmallWindowsMedia playback
WebMGoogleLossyHighSmallBrowsersHTML5 streaming
27What is the difference between OGG and Vorbis?
Answer

OGG is a container format, and Vorbis is the audio compression format commonly used inside it. Ogg Vorbis is open-source and gives good compression efficiency; it is used in open-source applications and interactive games.

Part ENumber Conversions and Numerical Problems

1Convert (35)10 to binary.
Answer
35 / 2 = 17, remainder 1
17 / 2 = 8, remainder 1
8 / 2 = 4, remainder 0
4 / 2 = 2, remainder 0
2 / 2 = 1, remainder 0
1 / 2 = 0, remainder 1
Read the remainders from bottom to top: 100011
(35)10 = (100011)2
2Convert (45)10 to binary.
Answer
45 / 2 = 22, remainder 1
22 / 2 = 11, remainder 0
11 / 2 = 5, remainder 1
5 / 2 = 2, remainder 1
2 / 2 = 1, remainder 0
1 / 2 = 0, remainder 1
Read the remainders from bottom to top: 101101
(45)10 = (101101)2
3Convert (59)10 to binary.
Answer
59 / 2 = 29, remainder 1
29 / 2 = 14, remainder 1
14 / 2 = 7, remainder 0
7 / 2 = 3, remainder 1
3 / 2 = 1, remainder 1
1 / 2 = 0, remainder 1
Read the remainders from bottom to top: 111011
(59)10 = (111011)2

Check: 32 + 16 + 8 + 2 + 1 = 59. (Some prints of the textbook show (11101)2, which equals 29. The correct answer is 111011.)

4Convert (65)10 to binary.
Answer
65 / 2 = 32, remainder 1
32 / 2 = 16, remainder 0
16 / 2 = 8, remainder 0
8 / 2 = 4, remainder 0
4 / 2 = 2, remainder 0
2 / 2 = 1, remainder 0
1 / 2 = 0, remainder 1
Read the remainders from bottom to top: 1000001
(65)10 = (1000001)2
5Convert (78)10 to binary.
Answer
78 / 2 = 39, remainder 0
39 / 2 = 19, remainder 1
19 / 2 = 9, remainder 1
9 / 2 = 4, remainder 1
4 / 2 = 2, remainder 0
2 / 2 = 1, remainder 0
1 / 2 = 0, remainder 1
Read the remainders from bottom to top: 1001110
(78)10 = (1001110)2
6Convert (123)10 to binary.
Answer
123 / 2 = 61, remainder 1
61 / 2 = 30, remainder 1
30 / 2 = 15, remainder 0
15 / 2 = 7, remainder 1
7 / 2 = 3, remainder 1
3 / 2 = 1, remainder 1
1 / 2 = 0, remainder 1
Read the remainders from bottom to top: 1111011
(123)10 = (1111011)2
7Convert (101101)2 to a decimal number.
Answer
(101101)2 = 1x32 + 0x16 + 1x8 + 1x4 + 0x2 + 1x1
        = 45
(101101)2 = (45)10
8Convert (110101)2 into its decimal and hexadecimal equivalents.
Answer
(110101)2 = 1x32 + 1x16 + 0x8 + 1x4 + 0x2 + 1x1
        = 53
(110101)2 = (53)10

Group in 4 bits from the right: 0011 0101
Hex digits:                    3    5
(110101)2 = (35)16
9Convert (10110101)2 into its decimal and hexadecimal equivalents.
Answer
(10110101)2 = 1x128 + 0x64 + 1x32 + 1x16 + 0x8 + 1x4 + 0x2 + 1x1
        = 181
(10110101)2 = (181)10

Group in 4 bits from the right: 1011 0101
Hex digits:                    B    5
(10110101)2 = (B5)16
10Convert (10101101)2 into its decimal and hexadecimal equivalents.
Answer
(10101101)2 = 1x128 + 0x64 + 1x32 + 0x16 + 1x8 + 1x4 + 0x2 + 1x1
        = 173
(10101101)2 = (173)10

Group in 4 bits from the right: 1010 1101
Hex digits:                    A    D
(10101101)2 = (AD)16
11Convert (10001)2 into its decimal and hexadecimal equivalents.
Answer
(10001)2 = 1x16 + 0x8 + 0x4 + 0x2 + 1x1
        = 17
(10001)2 = (17)10

Group in 4 bits from the right: 0001 0001
Hex digits:                    1    1
(10001)2 = (11)16
12Find the missing terms in the series: (1010)2, (1100)2, (1110)2, ____, ____.
Answer
The decimal values are 10, 12, 14, so the series increases by 2.
Next: 16 and 18
16 = (10000)2
18 = (10010)2
Missing terms: (10000)2, (10010)2
13Convert (101111010)2 into its octal and hexadecimal equivalents.
Answer
Group in 3 bits from the right: 101 111 010
Octal digits:                 5   7   2
(101111010)2 = (572)8

Group in 4 bits from the right: 0001 0111 1010
Hex digits:                    1    7    A
(101111010)2 = (17A)16
14Convert (1111001)2 into its octal and hexadecimal equivalents.
Answer
Group in 3 bits from the right: 001 111 001
Octal digits:                 1   7   1
(1111001)2 = (171)8

Group in 4 bits from the right: 0111 1001
Hex digits:                    7    9
(1111001)2 = (79)16
15Convert (101010101)2 into its octal and hexadecimal equivalents.
Answer
Group in 3 bits from the right: 101 010 101
Octal digits:                 5   2   5
(101010101)2 = (525)8

Group in 4 bits from the right: 0001 0101 0101
Hex digits:                    1    5    5
(101010101)2 = (155)16
16Convert (1000101)2 into its octal and hexadecimal equivalents.
Answer
Group in 3 bits from the right: 001 000 101
Octal digits:                 1   0   5
(1000101)2 = (105)8

Group in 4 bits from the right: 0100 0101
Hex digits:                    4    5
(1000101)2 = (45)16
17Convert (101101010)2 to octal.
Answer
Group in 3 bits from the right: 101 101 010
Octal digits:                 5   5   2
(101101010)2 = (552)8
18Convert (1110010101)2 to octal.
Answer
Group in 3 bits from the right: 001 110 010 101
Octal digits:                 1   6   2   5
(1110010101)2 = (1625)8
19Convert (100101111011)2 to hexadecimal.
Answer
Group in 4 bits from the right: 1001 0111 1011
Hex digits:                    9    7    B
(100101111011)2 = (97B)16
20Convert (1101011001)2 to hexadecimal.
Answer
Group in 4 bits from the right: 0011 0101 1001
Hex digits:                    3    5    9
(1101011001)2 = (359)16
21Convert (11110000)2 to hexadecimal.
Answer
Group in 4 bits from the right: 1111 0000
Hex digits:                    F    0
(11110000)2 = (F0)16
22Convert (523)8 to binary.
Answer
Octal digits:   5   2   3
3-bit binary:   101 010 011
(523)8 = (101010011)2
23Convert (7046)8 to binary.
Answer
Octal digits:   7   0   4   6
3-bit binary:   111 000 100 110
(7046)8 = (111000100110)2
24Convert (345)8 to binary.
Answer
Octal digits:   3   4   5
3-bit binary:   011 100 101
(345)8 = (011100101)2
25Convert (9AF)16 to binary.
Answer
Hex digits:     9    A    F
4-bit binary:   1001 1010 1111
(9AF)16 = (100110101111)2
26Convert (12D)16 to binary.
Answer
Hex digits:     1    2    D
4-bit binary:   0001 0010 1101
(12D)16 = (000100101101)2
27Convert (2F)16 to binary.
Answer
Hex digits:     2    F
4-bit binary:   0010 1111
(2F)16 = (00101111)2
28Convert (123)8 to decimal.
Answer
(123)8 = 1x8^2 + 2x8^1 + 3x8^0
       = 1x64 + 2x8 + 3x1
       = 64 + 16 + 3
       = 83
29Convert (258)16 to decimal.
Answer
(258)16 = 2x16^2 + 5x16^1 + 8x16^0
        = 2x256 + 5x16 + 8x1
        = 512 + 80 + 8
        = 600
30Represent -19 in sign and magnitude method (8 bits).
Answer
Magnitude 19 in 7 bits: 0010011
Sign: negative, so MSB = 1
-19 in sign and magnitude = 10010011
31Represent +49 in sign and magnitude method (8 bits).
Answer
Magnitude 49 in 7 bits: 0110001
Sign: positive, so MSB = 0
+49 in sign and magnitude = 00110001
32Represent -97 in sign and magnitude method (8 bits).
Answer
Magnitude 97 in 7 bits: 1100001
Sign: negative, so MSB = 1
-97 in sign and magnitude = 11100001
33Represent +127 in sign and magnitude method (8 bits).
Answer
Magnitude 127 in 7 bits: 1111111
Sign: positive, so MSB = 0
+127 in sign and magnitude = 01111111
34Represent -24 in 1's complement method (8 bits).
Answer
8-bit binary of 24: 00011000
Replace 0s with 1s and 1s with 0s: 11100111
-24 in 1's complement = 11100111
35Represent -69 in 1's complement method (8 bits).
Answer
8-bit binary of 69: 01000101
Replace 0s with 1s and 1s with 0s: 10111010
-69 in 1's complement = 10111010
36Represent -100 in 1's complement method (8 bits).
Answer
8-bit binary of 100: 01100100
Replace 0s with 1s and 1s with 0s: 10011011
-100 in 1's complement = 10011011
37Represent -127 in 1's complement method (8 bits).
Answer
8-bit binary of 127: 01111111
Replace 0s with 1s and 1s with 0s: 10000000
-127 in 1's complement = 10000000
38Represent -33 in 2's complement method (8 bits).
Answer
8-bit binary of 33: 00100001
1's complement:         11011110
Add 1:                  00000001
2's complement:         11011111
-33 in 2's complement = 11011111
39Represent -71 in 2's complement method (8 bits).
Answer
8-bit binary of 71: 01000111
1's complement:         10111000
Add 1:                  00000001
2's complement:         10111001
-71 in 2's complement = 10111001
40Represent -111 in 2's complement method (8 bits).
Answer
8-bit binary of 111: 01101111
1's complement:         10010000
Add 1:                  00000001
2's complement:         10010001
-111 in 2's complement = 10010001
41Represent -127 in 2's complement method (8 bits).
Answer
8-bit binary of 127: 01111111
1's complement:         10000000
Add 1:                  00000001
2's complement:         10000001
-127 in 2's complement = 10000001
42Add (1101)2 and (0011)2.
Answer
   1101
+  0011
-------
  10000
Check: 13 + 3 = 16 = (10000)2
43Add (1111)2 and (1101)2.
Answer
   1111
+  1101
-------
  11100
Check: 15 + 13 = 28 = (11100)2
44Add (1011)2 and (0110)2.
Answer
   1011
+  0110
-------
  10001
Check: 11 + 6 = 17 = (10001)2
45Add (1010)2 and (1010)2.
Answer
   1010
+  1010
-------
  10100
Check: 10 + 10 = 20 = (10100)2

Part FLong Answer Questions

1Explain the different number systems with examples.
Answer
Number systemBaseSymbolsExample
Decimal100-9(534)10
Binary20, 1(1001011)2 = 75
Octal80-7(123)8 = 83
Hexadecimal160-9, A-F(258)16 = 600

Each is a positional system: the value of a digit is the digit times a power of the base, based on its position.

2Explain the methods of number system conversion.
Answer
  • Decimal to binary: divide repeatedly by 2 until 0, then read the remainders from bottom to top.
  • Binary to decimal: multiply each bit by its power of 2 and add.
  • Octal to binary: replace each octal digit by its 3-bit binary equivalent and combine.
  • Binary to octal: group bits in 3s from the right (add leading 0s if needed) and convert each group.
  • Hexadecimal to binary: replace each hex digit by its 4-bit binary equivalent and combine.
  • Binary to hexadecimal: group bits in 4s from the right (add leading 0s if needed) and convert each group.
Octal01234567
Binary000001010011100101110111
3Why is the binary number system the foundation of modern computers?
Answer

Computers are built using millions or billions of tiny electronic switches called transistors, which can be in only two states: ON (high voltage, 1) or OFF (low voltage, 0). This two-state nature matches binary exactly, making it the simplest, most reliable and most error-resistant way to represent data. A system with more states, like decimal's 10 digits, would need precise voltage levels that are hard to maintain because of electrical noise, heat or signal degradation, causing frequent errors. In binary a signal is clearly 'on' or 'off'.

4Explain the integer representation methods with examples.
Answer
  • Sign and magnitude: MSB is the sign (0 positive, 1 negative); remaining 7 bits are the magnitude. -25 = 10011001.
  • 1's complement: flip every bit of the 8-bit positive form. -87: 01010111 becomes 10101000.
  • 2's complement: 1's complement plus 1. -25: 00011001, then 11100110, plus 1 gives 11100111.

2's complement is the most commonly used by computers because it is simple, efficient and avoids many problems of other methods. Complement methods are used only for negative integers.

5Explain floating point representation.
Answer

A floating point number has an integer part and a fractional part. It is stored in two parts: the mantissa, the actual digits normalised to the form 0.xxx (for 13.4 it is 0.134), and the exponent, which says how many places the point moves, like scientific notation. Decimal uses powers of 10 but computers use powers of 2. Example: 13.4 = 0.134 x 10^2, where 134 is the mantissa and 2 is the exponent. In a computer the same parts are stored in binary format.

6Explain character representation methods (ASCII and Unicode).
Answer

Computers store characters as binary codes. ASCII uses 7 bits (128 characters) and was published in 1963; Extended ASCII uses 8 bits (256 characters) and mostly adds European characters. Because these cannot represent all scripts, Unicode was introduced. It is universal and unambiguous, maintained by the Unicode Consortium, defines up to 1,114,112 code points and is encoded as UTF-8, UTF-16 or UTF-32.

EncodingBitsRangeUsed forLimitation
ASCII7128English text, control codesLimited characters
Extended ASCII8256European charactersNot global
Unicode16-322^8 to 2^32Global language supportRequires more storage
7Explain image representation and the common image file formats.
Answer

An image is a grid of pixels. Each pixel's colour is stored in binary using the RGB model: 8 bits each for Red, Green and Blue, i.e. 24 bits per pixel. A digital image file has a header, pixel data and metadata, and may be stored uncompressed or compressed (lossy or lossless).

  • BMP: Microsoft; uncompressed; large size but high quality; printing and editing.
  • JPEG: lossy; good balance of quality and size; photos and web images.
  • PNG: lossless; supports transparency; logos and web graphics.
  • GIF: 256 colours; supports animation and transparency; web animations and memes.
  • TIFF: professional use; lossy and lossless; high quality, large size.
8Explain audio representation and the common audio file formats.
Answer

Natural sound is an analog signal. It is converted into a digital signal by digitization so computers can store, process and transmit it.

  • WAV: Microsoft; uncompressed; very high quality, large files; professional editing and recording.
  • MP3: lossy; removes inaudible sounds; widely supported; music players and online sharing.
  • AAC: improved MP3 with better quality at the same bit rate; streaming platforms.
  • FLAC: lossless; archiving and high-fidelity playback.
  • OGG (Vorbis): open-source container with Vorbis compression; open-source applications and games.
  • WMA: Microsoft; lossy and lossless options; works best in Windows applications.
9Explain video representation and the common video file formats.
Answer

A video is a sequence of frames (usually 24 to 60 per second) with sound. Each frame is stored digitally, often in RGB format; the video is compressed and the audio is synchronised with the frames. The video and audio streams are stored together in one container file (MP4, AVI, MOV).

FormatDeveloperCompressionCommon uses
AVIMicrosoftLossy / losslessEditing, archiving
MP4MPEGLossyWeb, mobile, streaming
MKVOpen sourceLossy / losslessMovies, HD videos
MOVAppleLossyProfessional editing
FLVAdobeLossyOld online streaming
WMVMicrosoftLossyMedia playback
WebMGoogleLossyHTML5 streaming
10Explain binary addition with examples.
Answer

Binary addition follows its own rules because the base is 2: 0+0=0, 0+1=1, 1+0=1, and 1+1=0 with a carry of 1. Carries move to the next column on the left.

   1101
+  0011
-------
  10000
Check: 13 + 3 = 16 = (10000)2
   1111
+  1101
-------
  11100
Check: 15 + 13 = 28 = (11100)2