What are the bases of decimal, octal, binary and hexadecimal systems ?
Answer
The bases are:
- Decimal — Base 10
- Octal — Base 8
- Binary — Base 2
- Hexadecimal — Base 16
What is the common property of decimal, octal, binary and hexadecimal number systems ?
Answer
Decimal, octal, binary and hexadecimal number systems are all positional-value system.
Complete the sequence of following binary numbers : 100, 101, 110, ............... , ............... , ............... .
Answer
100, 101, 110, 111 , 1000 , 1001 .
Complete the sequence of following octal numbers : 525, 526, 527, ............... , ............... , ............... .
Answer
525, 526, 527, 530 , 531 , 532 .
Complete the sequence of following hexadecimal numbers : 17, 18, 19, ............... , ............... , ............... .
Answer
17, 18, 19, 1A , 1B , 1C .
Convert the following binary numbers to decimal and hexadecimal:
(a) 1010
(b) 111010
(c) 101011111
(d) 1100
(e) 10010101
(f) 11011100
Answer
(a) 1010
Converting to decimal:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 1 | 21 | 2 | 1x2=2 |
| 0 | 22 | 4 | 0x4=0 |
| 1 (MSB) | 23 | 8 | 1x8=8 |
Equivalent decimal number = 8 + 2 = 10
Therefore, (1010)2 = (10)10
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1010 | A (10) |
Therefore, (1010)2 = (A)16
(b) 111010
Converting to decimal:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 1 | 21 | 2 | 1x2=2 |
| 0 | 22 | 4 | 0x4=0 |
| 1 | 23 | 8 | 1x8=8 |
| 1 | 24 | 16 | 1x16=16 |
| 1 (MSB) | 25 | 32 | 1x32=32 |
Equivalent decimal number = 32 + 16 + 8 + 2 = 58
Therefore, (111010)2 = (58)10
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1010 | A (10) |
| 0011 | 3 |
Therefore, (111010)2 = (3A)16
(c) 101011111
Converting to decimal:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 (LSB) | 20 | 1 | 1x1=1 |
| 1 | 21 | 2 | 1x2=2 |
| 1 | 22 | 4 | 1x4=4 |
| 1 | 23 | 8 | 1x8=8 |
| 1 | 24 | 16 | 1x16=16 |
| 0 | 25 | 32 | 0x32=0 |
| 1 | 26 | 64 | 1x64=64 |
| 0 | 27 | 128 | 0x128=0 |
| 1 (MSB) | 28 | 256 | 1x256=256 |
Equivalent decimal number = 256 + 64 + 16 + 8 + 4 + 2 + 1 = 351
Therefore, (101011111)2 = (351)10
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1111 | F (15) |
| 0101 | 5 |
| 0001 | 1 |
Therefore, (101011111)2 = (15F)16
(d) 1100
Converting to decimal:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 (MSB) | 23 | 8 | 1x8=8 |
Equivalent decimal number = 8 + 4 = 12
Therefore, (1100)2 = (12)10
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1100 | C (12) |
Therefore, (1100)2 = (C)16
(e) 10010101
Converting to decimal:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 (LSB) | 20 | 1 | 1x1=1 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 0 | 23 | 8 | 0x8=0 |
| 1 | 24 | 16 | 1x16=16 |
| 0 | 25 | 32 | 0x32=0 |
| 0 | 26 | 64 | 0x64=0 |
| 1 (MSB) | 27 | 128 | 1x128=128 |
Equivalent decimal number = 1 + 4 + 16 + 128 = 149
Therefore, (10010101)2 = (149)10
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 0101 | 5 |
| 1001 | 9 |
Therefore, (101011111)2 = (95)16
(f) 11011100
Converting to decimal:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 | 23 | 8 | 1x8=8 |
| 1 | 24 | 16 | 1x16=16 |
| 0 | 25 | 32 | 0x32=0 |
| 1 | 26 | 64 | 1x64=64 |
| 1 (MSB) | 27 | 128 | 1x128=128 |
Equivalent decimal number = 4 + 8 + 16 + 64 + 128 = 220
Therefore, (11011100)2 = (220)10
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1100 | C (12) |
| 1101 | D (13) |
Therefore, (11011100)2 = (DC)16
Convert the following decimal numbers to binary and octal :
(a) 23
(b) 100
(c) 145
(d) 19
(e) 121
(f) 161
Answer
(a) 23
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 23 | 1 (LSB) |
| 2 | 11 | 1 |
| 2 | 5 | 1 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (23)10 = (10111)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 23 | 7 (LSB) |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (23)10 = (27)8
(b) 100
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 100 | 0 (LSB) |
| 2 | 50 | 0 |
| 2 | 25 | 1 |
| 2 | 12 | 0 |
| 2 | 6 | 0 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (100)10 = (1100100)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 100 | 4 (LSB) |
| 8 | 12 | 4 |
| 8 | 1 | 1 (MSB) |
| 0 |
Therefore, (100)10 = (144)8
(c) 145
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 145 | 1 (LSB) |
| 2 | 72 | 0 |
| 2 | 36 | 0 |
| 2 | 18 | 0 |
| 2 | 9 | 1 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (145)10 = (10010001)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 145 | 1 (LSB) |
| 8 | 18 | 2 |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (145)10 = (221)8
(d) 19
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 19 | 1 (LSB) |
| 2 | 9 | 1 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (19)10 = (10011)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 19 | 3 (LSB) |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (19)10 = (23)8
(e) 121
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 121 | 1 (LSB) |
| 2 | 60 | 0 |
| 2 | 30 | 0 |
| 2 | 15 | 1 |
| 2 | 7 | 1 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (121)10 = (1111001)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 121 | 1 (LSB) |
| 8 | 15 | 7 |
| 8 | 1 | 1 (MSB) |
| 0 |
Therefore, (121)10 = (171)8
(f) 161
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 161 | 1 (LSB) |
| 2 | 80 | 0 |
| 2 | 40 | 0 |
| 2 | 20 | 0 |
| 2 | 10 | 0 |
| 2 | 5 | 1 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (161)10 = (10100001)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 161 | 1 (LSB) |
| 8 | 20 | 4 |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (161)10 = (241)8
Convert the following hexadecimal numbers to binary :
(a) A6
(b) A07
(c) 7AB4
(d) BE
(e) BC9
(f) 9BC8
Answer
(a) A6
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 6 | 0110 |
| A (10) | 1010 |
(A6)16 = (10100110)2
(b) A07
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 7 | 0111 |
| 0 | 0000 |
| A (10) | 1010 |
(A07)16 = (101000000111)2
(c) 7AB4
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 4 | 0100 |
| B (11) | 1011 |
| A (10) | 1010 |
| 7 | 0111 |
(7AB4)16 = (111101010110100)2
(d) BE
| Hexadecimal Number | Binary Equivalent |
|---|---|
| E (14) | 1110 |
| B (11) | 1011 |
(BE)16 = (10111110)2
(e) BC9
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 9 | 1001 |
| C (12) | 1100 |
| B (11) | 1011 |
(BC9)16 = (101111001001)2
(f) 9BC8
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 8 | 1000 |
| C (12) | 1100 |
| B (11) | 1011 |
| 9 | 1001 |
(9BC8)16 = (1001101111001000)2
Convert the following binary numbers to hexadecimal and octal :
(a) 10011011101
(b) 1111011101011011
(c) 11010111010111
(d) 1010110110111
(e) 10110111011011
(f) 1111101110101111
Answer
(a) 10011011101
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1101 | D (13) |
| 1101 | D (13) |
| 0100 | 4 |
Therefore, (10011011101)2 = (4DD)16
Converting to Octal:
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 101 | 5 |
| 011 | 3 |
| 011 | 3 |
| 010 | 2 |
Therefore, (10011011101)2 = (2335)8
(b) 1111011101011011
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1011 | B (11) |
| 0101 | 5 |
| 0111 | 7 |
| 1111 | F (15) |
Therefore, (1111011101011011)2 = (F75B)16
Converting to Octal:
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 011 | 3 |
| 011 | 3 |
| 101 | 5 |
| 011 | 3 |
| 111 | 7 |
| 001 | 1 |
Therefore, (1111011101011011)2 = (173533)8
(c) 11010111010111
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 0111 | 7 |
| 1101 | D (13) |
| 0101 | 5 |
| 0011 | 3 |
Therefore, (11010111010111)2 = (35D7)16
Converting to Octal:
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 111 | 7 |
| 010 | 2 |
| 111 | 7 |
| 010 | 2 |
| 011 | 3 |
Therefore, (11010111010111)2 = (32727)8
(d) 1010110110111
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 0111 | 7 |
| 1011 | B (11) |
| 0101 | 5 |
| 0001 | 1 |
Therefore, (1010110110111)2 = (15B7)16
Converting to Octal:
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 111 | 7 |
| 110 | 6 |
| 110 | 6 |
| 010 | 2 |
| 001 | 1 |
Therefore, (1010110110111)2 = (12667)8
(e) 10110111011011
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1011 | B (11) |
| 1101 | D (13) |
| 1101 | D (13) |
| 0010 | 2 |
Therefore, (10110111011011)2 = (2DDB)16
Converting to Octal:
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 011 | 3 |
| 011 | 3 |
| 111 | 7 |
| 110 | 6 |
| 010 | 2 |
Therefore, (10110111011011)2 = (26733)8
(f) 1111101110101111
Converting to hexadecimal:
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1111 | F (15) |
| 1010 | A (10) |
| 1011 | B (11) |
| 1111 | F (15) |
Therefore, (1111101110101111)2 = (FBAF)16
Converting to Octal:
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 111 | 7 |
| 101 | 5 |
| 110 | 6 |
| 101 | 5 |
| 111 | 7 |
| 001 | 1 |
Therefore, (1111101110101111)2 = (175657)8
Encode "INDIA" and "MARCHING" into ASCII codeform.
Answer
ASCII value of I is 73.
ASCII value of N is 78.
ASCII value of D is 68.
ASCII value of I is 73.
ASCII value of A is 65.
Hence, ASCII code for the word 'INDIA' is 73 78 68 73 65.
ASCII value of M is 77.
ASCII value of A is 65.
ASCII value of R is 82.
ASCII value of C is 67.
ASCII value of H is 72.
ASCII value of I is 73.
ASCII value of N is 78.
ASCII value of G is 71.
Hence, ASCII code for the word 'MARCHING' is 77 65 82 67 72 73 78 71.
ASCII code is ............... bit code, extended ASCII is ............... bit code and Unicode is ............... bit code.
Answer
ASCII code is 7 bit code, extended ASCII is 8 bit code, and Unicode is 8, 16, 32 bit code.
What is the use of ASCII code and Unicode ?
Answer
ASCII stands for American Standard Code for Information Interchange. It uses a 7-bit code and it can represent 128 characters. ASCII code is mostly used to represent the characters of English language, standard keyboard characters as well as control characters like Carriage Return and Form Feed.
Unicode is a universal character encoding scheme that can represent different sets of characters belonging to different languages by assigning a number to each of the character.
What is the full form of ASCII and Unicode ?
Answer
The full form of ASCII is American Standard Code for Information Interchange and the full form of Unicode is Universal Character Encoding.
Name two Indian languages in Unicode along with their script names.
Answer
Two Indian languages in Unicode along with their script names are:
- Hindi - Script: Devanagari
- Bengali - Script: Bengali
The value of radix in binary number system is ..........
- 2
- 8
- 10
- 16
Answer
2
Reason — The base (or radix) of the binary number system is 2 because it uses only two digits: 0 and 1.
The value of radix in octal number system is ..........
- 2
- 8
- 10
- 16
Answer
8
Reason — The radix or base of the octal number system is 8 because it uses eight digits, ranging from 0 to 7, to represent numbers.
The value of radix in decimal number system is ..........
- 2
- 8
- 10
- 16
Answer
10
Reason — The radix or base of the decimal number system is 10 because it uses ten digits, from 0 to 9, to represent numbers.
The value of radix in hexadecimal number system is ..........
- 2
- 8
- 10
- 16
Answer
16
Reason — The radix or base of the hexadecimal number system is 16 because it uses sixteen symbols (0-9 and A-F) to represent numbers.
Which of the following are not valid symbols in octal number system ?
- 2
- 8
- 9
- 7
Answer
8, 9
Reason — The octal number system uses digits ranging from 0 to 7. Therefore, 8 and 9 are not valid symbols in the octal system.
Which of the following are not valid symbols in hexadecimal number system ?
- 2
- 8
- 9
- G
- F
Answer
G
Reason — The hexadecimal number system uses digits from 0 to 9 and letters from A to F to represent values. Therefore, "G" is not a valid symbol in the hexadecimal system.
Which of the following are not valid symbols in decimal number system ?
- 2
- 8
- 9
- G
- F
Answer
G, F
Reason — The decimal number system uses only the digits 0 to 9. Therefore, "G" and "F" are not valid symbols in the decimal system.
The hexadecimal digits are 1 to 0 and A to ..........
- E
- F
- G
- D
Answer
F
Reason — The hexadecimal number system uses the digits 0 to 9 and the letters A to F to represent values.
The binary equivalent of the decimal number 10 is ..........
- 0010
- 10
- 1010
- 010
Answer
1010
Reason —
| 2 | 10 | Remainder |
|---|---|---|
| 2 | 5 | 0 (LSB) |
| 2 | 2 | 1 |
| 2 | 1 | 0 |
| 0 | 1 (MSB) |
Therefore, (10)10 = (1010)2.
ASCII code is a 7 bit code for ..........
- letters
- numbers
- other symbols
- all of these
Answer
all of these
Reason — The ASCII (American Standard Code for Information Interchange) code is a 7-bit code that represents a set of characters including letters, numbers, and various symbols.
How many bytes are there in 1011 1001 0110 1110 numbers?
- 1
- 2
- 4
- 8
Answer
2
Reason — To calculate the number of bytes:
- The given number is
1011 1001 0110 1110, which has 16 bits. - 1 byte = 8 bits.
To find the number of bytes:
Number of bytes = Total number of bits / Bits per byte
Number of bytes = 16 bits / 8 bits per byte = 2 bytes
So, the number of bytes is 2.
The binary equivalent of the octal Numbers 13.54 is.....
- 1011.1011
- 1001.1110
- 1101.1110
- None of these
Answer
1101.1110
Reason —
| Octal Number | Binary Equivalent |
|---|---|
| 4 | 100 |
| 5 | 101 |
| 3 | 011 |
| 1 | 001 |
Therefore, (13.54)8 = ()2.
The octal equivalent of 111 010 is.....
- 81
- 72
- 71
- 82
Answer
72
Reason —
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 111 | 7 |
| 010 | 2 |
Therefore, (111010)2 = (72)8
The input hexadecimal representation of 1110 is ..........
- 0111
- E
- 15
- 14
Answer
E
Reason —
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1110 | E |
Therefore, (1110)2 = (E)16.
Which of the following is not a binary number ?
- 1111
- 101
- 11E
- 000
Answer
11E
Reason — A binary number system uses only the digits 0 and 1. Therefore, the letter E is not a binary number. The other options (1111, 101, and 000) are valid binary numbers.
Convert the hexadecimal number 2C to decimal:
- 3A
- 34
- 44
- 43
Answer
44
Reason —
| Hexadecimal Number | Power | Value | Result |
|---|---|---|---|
| C (12) | 160 | 1 | 12x1=12 |
| 2 | 161 | 16 | 2x16=32 |
Equivalent decimal number = 32 + 12 = 44
Therefore, (2C)16 = (44)10.
UTF8 is a type of .......... encoding.
- ASCII
- extended ASCII
- Unicode
- ISCII
Answer
Unicode
Reason — UTF-8 (Unicode Transformation Format - 8-bit) is a type of Unicode encoding. It is a variable-width encoding that can represent every character in Unicode character set.
UTF32 is a type of .......... encoding.
- ASCII
- extended ASCII
- Unicode
- ISCII
Answer
Unicode
Reason — UTF-32 (Unicode Transformation Format - 32-bit) is a type of Unicode encoding. It is a fixed length encoding scheme that uses exactly 4 bytes to represent all Unicode code points.
Which of the following is not a valid UTF8 representation?
- 2 octet (16 bits)
- 3 octet (24 bits)
- 4 octet (32 bits)
- 8 octet (64 bits)
Answer
8 octet (64 bits)
Reason — UTF-8 is a variable-width encoding that uses 1 to 4 bytes (octets) to represent each character. The valid UTF-8 representations are:
- 1 octet (8 bits)
- 2 octets (16 bits)
- 3 octets (24 bits)
- 4 octets (32 bits)
Which of the following is not a valid encoding scheme for characters ?
- ASCII
- ISCII
- Unicode
- ESCII
Answer
ESCII
Reason — ASCII (American Standard Code for Information Interchange), ISCII (Indian Script Code for Information Interchange), and Unicode are well-known character encoding schemes used to represent text in computers and other devices.
The Decimal number system is composed of 10 unique symbols.
The Binary number system is composed of 2 unique symbols.
The Octal number system is composed of 8 unique symbols.
The Hexadecimal number system is composed of 16 unique symbols.
The illegal digits of octal number system are 8 and 9.
Hexadecimal number system recognizes symbols 0 to 9 and A to F.
Each octal number is replaced with 3 bits in octal to binary conversion.
Each Hexadecimal number is replaced with 4 bits in Hex to binary conversion.
ASCII is a 7 bit code while extended ASCII is a 8 bit code.
The Unicode encoding scheme can represent all symbols/characters of most languages.
The ISCII encoding scheme represents Indian Languages' characters on computers.
UTF8 can take upto 4 bytes to represent a symbol.
UTF32 takes exactly 4 bytes to represent a symbol.
Unicode value of a symbol is called code point.
A computer can work with Decimal number system.
Answer
False
Reason — Computers work with the binary number system (base-2), which uses only 0s and 1s for processing data.
A computer can work with Binary number system.
Answer
True
Reason — Computers work with the binary number system (base-2), which uses only 0s and 1s for processing data.
The number of unique symbols in Hexadecimal number system is 15.
Answer
False
Reason — The hexadecimal number system has 16 unique symbols: 0–9 and A–F.
Number systems can also represent characters.
Answer
False
Reason — Number systems are used to represent numbers, not characters. Characters are represented using encoding schemes such as ASCII or Unicode, which map numbers to characters.
ISCII is an encoding scheme created for Indian language characters.
Answer
True
Reason — ISCII (Indian Script Code for Information Interchange) is an encoding scheme developed to represent various Indian language scripts, such as Devanagari, Tamil, Telugu, and others, in digital systems.
Unicode is able to represent nearly all languages' characters.
Answer
True
Reason — Unicode is a universal character encoding standard that can represent characters from almost all languages around the world.
UTF8 is a fixed-length encoding scheme.
Answer
False
Reason — UTF-8 is a variable-width encoding that uses 1 to 4 bytes (octets) to represent each character.
UTF32 is a fixed-length encoding scheme.
Answer
True
Reason — UTF-32 (Unicode Transformation Format - 32-bit) is a type of Unicode encoding. It is a fixed length encoding scheme that uses exactly 4 bytes to represent all Unicode code points.
UTF8 is a variable-length encoding scheme and can represent characters in 1 through 4 bytes.
Answer
True
Reason — UTF-8 is a variable-width encoding that uses 1 to 4 bytes (octets) to represent each character.
UTF8 and UTF32 are the only encoding schemes supported by Unicode.
Answer
False
Reason — Unicode supports multiple encoding schemes, including UTF-8, UTF-16, and UTF-32.
Assertion. A 3-digit binary number can have maximum 8 unique binary values.
Reason. Maximum number of values possible for an n-digit binary number are 2n.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
A 3-digit binary number can represent up to 23=8 unique values, as each digit in a binary number can be either 0 or 1. The maximum number of values possible for an n-digit binary number is 2n, which confirms that a 3-digit binary number can represent up to 8 unique values.
Assertion. The decimal number system has base 10.
Reason. The decimal number system is composed of 10 unique symbols.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
The decimal number system has a base of 10 because it uses 10 unique symbols (0 to 9).
Assertion. Some similar looking numbers of different number systems have the same value, e.g., 78 = 710.
Reason. Not all the similar looking numbers of different number systems have the same value, e.g., 238 ≠ 2310.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true but R is not the correct explanation of A.
Explanation
In some cases, numbers that look the same in different number systems do represent the same value. For instance, 78 (base-8) and 710 (base-10) both represent the decimal value 7. However, not all numbers that appear similar in different number systems are equivalent. For example, 238 (base-8) is not equal to 2310 (base-10). In base-8, 238 represents 19 in decimal. In contrast, 2310 represents the decimal value 23. Thus, while the number 23 looks the same, its value differs depending on the number system's base.
Assertion. 0298 is a valid octal number.
Reason. An octal number cannot have digits 8 and 9 as these are invalid digits in octal number system.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
A is false but R is true.
Explanation
The number 0298 is invalid octal number because the digit 9 is not allowed in the octal system. An octal number system uses only the digits 0 to 7. Digits 8 and 9 are not valid in this system.
Assertion. An octal digit can be directly converted to binary by placing 3 digit binary equivalent of each octal digit.
Reason. Binary number system has base 2 and octal number system has base 8 and 23 = 8, hence 3 binary digits for an octal digit.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
Each octal digit can be directly converted to a 3-digit binary number. For example, the octal digit 7 converts to the binary number 111. This is because the relationship between the octal and binary systems is that 23 = 8, meaning each octal digit (base-8) maps exactly to 3 binary digits (base-2).
Assertion. 'BED' is a legal hexadecimal value while 'BEDS' is not.
Reason. Hexadecimal number system does not recognize plural items.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
A is true but R is false.
Explanation
BED' is a legal hexadecimal value because the hexadecimal number system uses the digits 0–9 and the letters A–F. On the other hand, 'BEDS' is not a valid hexadecimal number because it includes the letter S, which is not recognized in the hexadecimal system.
Assertion. The 16 unique symbols of hexadecimal can be decided by the OS.
Reason. Unicode has decided the base symbols for hexadecimal as 0-9, A-F.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
A is false but R is true.
Explanation
The 16 unique symbols used in the hexadecimal number system (0-9 and A-F) are standard and defined by the hexadecimal numbering system itself. Unicode specifies these symbols as 0-9 and A-F for hexadecimal notation.
Assertion. Unicode can represent nearly all known characters of all known and scripted languages.
Reason. There are multiple character encoding schemes in Unicode, e.g., UTF-8.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true but R is not the correct explanation of A.
Explanation
Unicode is developed as a universal character set with the aim of defining all the characters needed for writing the majority of known languages in use on computers in one place. It includes multiple encoding systems to represent these characters, such as UTF-8, UTF-16, and UTF-32.
Assertion. The memory consumed to represent a character/value varies in UTF-8 while it is the same for all characters/values for UTF-32.
Reason. UTF-8 is a variable length encoding scheme and UTF-32 is a fixed length encoding scheme.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
UTF-8 is a variable-width encoding that uses 1 to 4 bytes (octets) to represent each character, depending on the character's code point. UTF-32, on the other hand, is a fixed-width encoding scheme that uses exactly 4 bytes for every Unicode code point, providing a consistent length for all characters.
What are some number systems used by computers ?
Answer
The most commonly used number systems are decimal, binary, octal and hexadecimal number systems.
What is the use of Hexadecimal number system on computers ?
Answer
The Hexadecimal number system is used in computers to specify memory addresses (which are 16-bit or 32-bit long). For example, a memory address 1101011010101111 is a big binary address but with hex it is D6AF which is easier to remember. The Hexadecimal number system is also used to represent colour codes. For example, FFFFFF represents White, FF0000 represents Red, etc.
What does radix or base signify ?
Answer
The radix or base of a number system signifies how many unique symbols or digits are used in the number system to represent numbers. For example, the decimal number system has a radix or base of 10 meaning it uses 10 digits from 0 to 9 to represent numbers.
What is the use of encoding schemes ?
Answer
Encoding schemes help Computers represent and recognize letters, numbers and symbols. It provides a predetermined set of codes for each recognized letter, number and symbol. Most popular encoding schemes are ASCI, Unicode, ISCII, etc.
Discuss UTF-8 encoding scheme.
Answer
UTF-8 is a variable width encoding that can represent every character in Unicode character set. The code unit of UTF-8 is 8 bits called an octet. It uses 1 to maximum 6 octets to represent code points depending on their size i.e. sometimes it uses 8 bits to store the character, other times 16 or 24 or more bits. It is a type of multi-byte encoding.
How is UTF-8 encoding scheme different from UTF-32 encoding scheme ?
Answer
UTF-8 is a variable length encoding scheme that uses different number of bytes to represent different characters whereas UTF-32 is a fixed length encoding scheme that uses exactly 4 bytes to represent all Unicode code points.
What is the most significant bit and the least significant bit in a binary code ?
Answer
In a binary code, the leftmost bit is called the most significant bit or MSB. It carries the largest weight. The rightmost bit is called the least significant bit or LSB. It carries the smallest weight. For example:
What are ASCII and extended ASCII encoding schemes ?
Answer
ASCII encoding scheme uses a 7-bit code and it represents 128 characters. Its advantages are simplicity and efficiency. Extended ASCII encoding scheme uses a 8-bit code and it represents 256 characters.
What is the utility of ISCII encoding scheme ?
Answer
ISCII or Indian Standard Code for Information Interchange can be used to represent Indian languages on the computer. It supports Indian languages that follow both Devanagari script and other scripts like Tamil, Bengali, Oriya, Assamese, etc.
What is Unicode ? What is its significance ?
Answer
Unicode is a universal character encoding scheme that can represent different sets of characters belonging to different languages by assigning a number to each of the character. It has the following significance:
- It defines all the characters needed for writing the majority of known languages in use today across the world.
- It is a superset of all other character sets.
- It is used to represent characters across different platforms and programs.
What all encoding schemes does Unicode use to represent characters ?
Answer
Unicode uses UTF-8, UTF-16 and UTF-32 encoding schemes.
What are ASCII and ISCII ? Why are these used ?
Answer
ASCII stands for American Standard Code for Information Interchange. It uses a 7-bit code and it can represent 128 characters. ASCII code is mostly used to represent the characters of English language, standard keyboard characters as well as control characters like Carriage Return and Form Feed. ISCII stands for Indian Standard Code for Information Interchange. It uses a 8-bit code and it can represent 256 characters. It retains all ASCII characters and offers coding for Indian scripts also. Majority of the Indian languages can be represented using ISCII.
What are UTF-8 and UTF-32 encoding schemes? Which one is more popular encoding scheme ?
Answer
UTF-8 is a variable length encoding scheme that uses different number of bytes to represent different characters whereas UTF-32 is a fixed length encoding scheme that uses exactly 4 bytes to represent all Unicode code points. UTF-8 is the more popular encoding scheme.
What do you understand by code point ?
Answer
Code point refers to a code from a code space that represents a single character from the character set represented by an encoding scheme. For example, 0x41 is one code point of ASCII that represents character 'A'.
What is the difference between fixed length and variable length encoding schemes ?
Answer
Variable length encoding scheme uses different number of bytes or octets (set of 8 bits) to represent different characters whereas fixed length encoding scheme uses a fixed number of bytes to represent different characters.
Convert the following binary numbers to decimal:
(a) 1101
Answer
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 (LSB) | 20 | 1 | 1x1=1 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 (MSB) | 23 | 8 | 1x8=8 |
Equivalent decimal number = 1 + 4 + 8 = 13
Therefore, (1101)2 = (13)10
(b) 111010
Answer
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 1 | 21 | 2 | 1x2=2 |
| 0 | 22 | 4 | 0x4=0 |
| 1 | 23 | 8 | 1x8=8 |
| 1 | 24 | 16 | 1x16=16 |
| 1 (MSB) | 25 | 32 | 1x32=32 |
Equivalent decimal number = 2 + 8 + 16 + 32 = 58
Therefore, (111010)2 = (58)10
(c) 101011111
Answer
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 (LSB) | 20 | 1 | 1x1=1 |
| 1 | 21 | 2 | 1x2=2 |
| 1 | 22 | 4 | 1x4=4 |
| 1 | 23 | 8 | 1x8=8 |
| 1 | 24 | 16 | 1x16=16 |
| 0 | 25 | 32 | 0x32=0 |
| 1 | 26 | 64 | 1x64=64 |
| 0 | 27 | 128 | 0x128=0 |
| 1 (MSB) | 28 | 256 | 1x256=256 |
Equivalent decimal number = 1 + 2 + 4 + 8 + 16 + 64 + 256 = 351
Therefore, (101011111)2 = (351)10
Convert the following binary numbers to decimal :
(a) 1100
Answer
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 (MSB) | 23 | 8 | 1x8=8 |
Equivalent decimal number = 4 + 8 = 12
Therefore, (1100)2 = (12)10
(b) 10010101
Answer
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 (LSB) | 20 | 1 | 1x1=1 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 0 | 23 | 8 | 0x8=0 |
| 1 | 24 | 16 | 1x16=16 |
| 0 | 25 | 32 | 0x32=0 |
| 0 | 26 | 64 | 0x64=0 |
| 1 (MSB) | 27 | 128 | 1x128=128 |
Equivalent decimal number = 1 + 4 + 16 + 128 = 149
Therefore, (10010101)2 = (149)10
(c) 11011100
Answer
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 (LSB) | 20 | 1 | 0x1=0 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 | 23 | 8 | 1x8=8 |
| 1 | 24 | 16 | 1x16=16 |
| 0 | 25 | 32 | 0x32=0 |
| 1 | 26 | 64 | 1x64=64 |
| 1 (MSB) | 27 | 128 | 1x128=128 |
Equivalent decimal number = 4 + 8 + 16 + 64 + 128 = 220
Therefore, (11011100)2 = (220)10
Convert the following decimal numbers to binary:
(a) 23
Answer
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 23 | 1 (LSB) |
| 2 | 11 | 1 |
| 2 | 5 | 1 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (23)10 = (10111)2
(b) 100
Answer
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 100 | 0 (LSB) |
| 2 | 50 | 0 |
| 2 | 25 | 1 |
| 2 | 12 | 0 |
| 2 | 6 | 0 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (100)10 = (1100100)2
(c) 145
Answer
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 145 | 1 (LSB) |
| 2 | 72 | 0 |
| 2 | 36 | 0 |
| 2 | 18 | 0 |
| 2 | 9 | 1 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (145)10 = (10010001)2
(d) 0.25
Answer
| Multiply | = | Resultant | Carry |
|---|---|---|---|
| 0.25 x 2 | = | 0.5 | 0 |
| 0.5 x 2 | = | 0 | 1 |
Therefore, (0.25)10 = (0.01)2
Convert the following decimal numbers to binary:
(a) 19
Answer
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 19 | 1 (LSB) |
| 2 | 9 | 1 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (19)10 = (10011)2
(b) 122
Answer
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 122 | 0 (LSB) |
| 2 | 61 | 1 |
| 2 | 30 | 0 |
| 2 | 15 | 1 |
| 2 | 7 | 1 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (122)10 = (1111010)2
(c) 161
Answer
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 161 | 1 (LSB) |
| 2 | 80 | 0 |
| 2 | 40 | 0 |
| 2 | 20 | 0 |
| 2 | 10 | 0 |
| 2 | 5 | 1 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (161)10 = (10100001)2
(d) 0.675
Answer
| Multiply | = | Resultant | Carry |
|---|---|---|---|
| 0.675 x 2 | = | 0.35 | 1 |
| 0.35 x 2 | = | 0.7 | 0 |
| 0.7 x 2 | = | 0.4 | 1 |
| 0.4 x 2 | = | 0.8 | 0 |
| 0.8 x 2 | = | 0.6 | 1 |
(We stop after 5 iterations if fractional part doesn't become 0)
Therefore, (0.675)10 = (0.10101)2
Convert the following decimal numbers to octal:
(a) 19
Answer
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 19 | 3 (LSB) |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (19)10 = (23)8
(b) 122
Answer
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 122 | 2 (LSB) |
| 8 | 15 | 7 |
| 8 | 1 | 1 (MSB) |
| 0 |
Therefore, (122)10 = (172)8
(c) 161
Answer
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 161 | 1 (LSB) |
| 8 | 20 | 4 |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (161)10 = (241)8
(d) 0.675
Answer
| Multiply | = | Resultant | Carry |
|---|---|---|---|
| 0.675 x 8 | = | 0.4 | 5 |
| 0.4 x 8 | = | 0.2 | 3 |
| 0.2 x 8 | = | 0.6 | 1 |
| 0.6 x 8 | = | 0.8 | 4 |
| 0.8 x 8 | = | 0.4 | 6 |
Therefore, (0.675)10 = (0.53146)8
Convert the following hexadecimal numbers to binary:
(a) A6
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 6 | 0110 |
| A (10) | 1010 |
(A6)16 = (10100110)2
(b) A07
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 7 | 0111 |
| 0 | 0000 |
| A (10) | 1010 |
(A07)16 = (101000000111)2
(c) 7AB4
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 4 | 0100 |
| B (11) | 1011 |
| A (10) | 1010 |
| 7 | 0111 |
(7AB4)16 = (111101010110100)2
Convert the following hexadecimal numbers to binary:
(a) 23D
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| D (13) | 1101 |
| 3 | 0011 |
| 2 | 0010 |
(23D)16 = (1000111101)2
(b) BC9
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 9 | 1001 |
| C (12) | 1100 |
| B (11) | 1011 |
(BC9)16 = (101111001001)2
(c) 9BC8
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 8 | 1000 |
| C (12) | 1100 |
| B (11) | 1011 |
| 9 | 1001 |
(9BC8)16 = (1001101111001000)2
Convert the following binary numbers to hexadecimal:
(a) 10011011101
Answer
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1101 | D (13) |
| 1101 | D (13) |
| 0100 | 4 |
Therefore, (10011011101)2 = (4DD)16
(b) 1111011101011011
Answer
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1011 | B (11) |
| 0101 | 5 |
| 0111 | 7 |
| 1111 | F (15) |
Therefore, (1111011101011011)2 = (F75B)16
(c) 11010111010111
Answer
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 0111 | 7 |
| 1101 | D (13) |
| 0101 | 5 |
| 0011 | 3 |
Therefore, (11010111010111)2 = (35D7)16
Convert the following binary numbers to hexadecimal:
(a) 1010110110111
Answer
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 0111 | 7 |
| 1011 | B (11) |
| 0101 | 5 |
| 0001 | 1 |
Therefore, (1010110110111)2 = (15B7)16
(b) 10110111011011
Answer
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1011 | B (11) |
| 1101 | D (13) |
| 1101 | D (13) |
| 0010 | 2 |
Therefore, (10110111011011)2 = (2DDB)16
(c) 0110101100
Answer
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1100 | C (12) |
| 1010 | A (10) |
| 0001 | 1 |
Therefore, (0110101100)2 = (1AC)16
Convert the following octal numbers to decimal:
(a) 257
Answer
| Octal No | Power | Value | Result |
|---|---|---|---|
| 7 (LSB) | 80 | 1 | 7x1=7 |
| 5 | 81 | 8 | 5x8=40 |
| 2 (MSB) | 82 | 64 | 2x64=128 |
Equivalent decimal number = 7 + 40 + 128 = 175
Therefore, (257)8 = (175)10
(b) 3527
Answer
| Octal No | Power | Value | Result |
|---|---|---|---|
| 7 (LSB) | 80 | 1 | 7x1=7 |
| 2 | 81 | 8 | 2x8=16 |
| 5 | 82 | 64 | 5x64=320 |
| 3 (MSB) | 83 | 512 | 3x512=1536 |
Equivalent decimal number = 7 + 16 + 320 + 1536 = 1879
Therefore, (3527)8 = (1879)10
(c) 123
Answer
| Octal No | Power | Value | Result |
|---|---|---|---|
| 3 (LSB) | 80 | 1 | 3x1=3 |
| 2 | 81 | 8 | 2x8=16 |
| 1 (MSB) | 82 | 64 | 1x64=64 |
Equivalent decimal number = 3 + 16 + 64 = 83
Therefore, (123)8 = (83)10
(d) 605.12
Answer
| Octal No | Power | Value | Result |
|---|---|---|---|
| 5 | 80 | 1 | 5x1=5 |
| 0 | 81 | 8 | 0x8=0 |
| 6 | 82 | 64 | 6x64=384 |
| Octal No | Power | Value | Result |
|---|---|---|---|
| 1 | 8-1 | 0.125 | 1x0.125=0.125 |
| 2 | 8-2 | 0.0156 | 2x0.0156=0.0312 |
Equivalent decimal number = 5 + 384 + 0.125 + 0.0312 = 389.1562
Therefore, (605.12)8 = (389.1562)10
Convert the following hexadecimal numbers to decimal:
(a) A6
Answer
| Hexadecimal Number | Power | Value | Result |
|---|---|---|---|
| 6 | 160 | 1 | 6x1=6 |
| A (10) | 161 | 16 | 10x16=160 |
Equivalent decimal number = 6 + 160 = 166
Therefore, (A6)16 = (166)10
(b) A13B
Answer
| Hexadecimal Number | Power | Value | Result |
|---|---|---|---|
| B (11) | 160 | 1 | 11x1=11 |
| 3 | 161 | 16 | 3x16=48 |
| 1 | 162 | 256 | 1x256=256 |
| A (10) | 163 | 4096 | 10x4096=40960 |
Equivalent decimal number = 11 + 48 + 256 + 40960 = 41275
Therefore, (A13B)16 = (41275)10
(c) 3A5
Answer
| Hexadecimal Number | Power | Value | Result |
|---|---|---|---|
| 5 | 160 | 1 | 5x1=5 |
| A (10) | 161 | 16 | 10x16=160 |
| 3 | 162 | 256 | 3x256=768 |
Equivalent decimal number = 5 + 160 + 768 = 933
Therefore, (3A5)16 = (933)10
Convert the following hexadecimal numbers to decimal:
(a) E9
Answer
| Hexadecimal Number | Power | Value | Result |
|---|---|---|---|
| 9 | 160 | 1 | 9x1=9 |
| E (14) | 161 | 16 | 14x16=224 |
Equivalent decimal number = 9 + 224 = 233
Therefore, (E9)16 = (233)10
(b) 7CA3
Answer
| Hexadecimal Number | Power | Value | Result |
|---|---|---|---|
| 3 (11) | 160 | 1 | 3x1=3 |
| A (10) | 161 | 16 | 10x16=160 |
| C (12) | 162 | 256 | 12x256=3072 |
| 7 | 163 | 4096 | 7x4096=28672 |
Equivalent decimal number = 3 + 160 + 3072 + 28672 = 31907
Therefore, (7CA3)16 = (31907)10
Convert the following decimal numbers to hexadecimal:
(a) 132
Answer
| 16 | Quotient | Remainder |
|---|---|---|
| 16 | 132 | 4 |
| 16 | 8 | 8 |
| 0 |
Therefore, (132)10 = (84)16
(b) 2352
Answer
| 16 | Quotient | Remainder |
|---|---|---|
| 16 | 2352 | 0 |
| 16 | 147 | 3 |
| 16 | 9 | 9 |
| 0 |
Therefore, (2352)10 = (930)16
(c) 122
Answer
| 16 | Quotient | Remainder |
|---|---|---|
| 16 | 122 | A (10) |
| 16 | 7 | 7 |
| 0 |
Therefore, (122)10 = (7A)16
(d) 0.675
Answer
| Multiply | = | Resultant | Carry |
|---|---|---|---|
| 0.675 x 16 | = | 0.8 | A (10) |
| 0.8 x 16 | = | 0.8 | C (12) |
| 0.8 x 16 | = | 0.8 | C (12) |
| 0.8 x 16 | = | 0.8 | C (12) |
| 0.8 x 16 | = | 0.8 | C (12) |
(We stop after 5 iterations if fractional part doesn't become 0)
Therefore, (0.675)10 = (0.ACCCC)16
Convert the following decimal numbers to hexadecimal:
(a) 206
Answer
| 16 | Quotient | Remainder |
|---|---|---|
| 16 | 206 | E (14) |
| 16 | 12 | C (12) |
| 0 |
Therefore, (206)10 = (CE)16
(b) 3619
Answer
| 16 | Quotient | Remainder |
|---|---|---|
| 16 | 3619 | 3 |
| 16 | 226 | 2 |
| 16 | 14 | E (14) |
| 0 |
Therefore, (3619)10 = (E23)16
Convert the following hexadecimal numbers to octal:
(a) 38AC
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| C (12) | 1100 |
| A (10) | 1010 |
| 8 | 1000 |
| 3 | 0011 |
(38AC)16 = (11100010101100)2
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 100 | 4 |
| 101 | 5 |
| 010 | 2 |
| 100 | 4 |
| 011 | 3 |
(38AC)16 = (34254)8
(b) 7FD6
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| 6 | 0110 |
| D (13) | 1101 |
| F (15) | 1111 |
| 7 | 0111 |
(7FD6)16 = (111111111010110)2
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 110 | 6 |
| 010 | 2 |
| 111 | 7 |
| 111 | 7 |
| 111 | 7 |
(7FD6)16 = (77726)8
(c) ABCD
Answer
| Hexadecimal Number | Binary Equivalent |
|---|---|
| D (13) | 1101 |
| C (12) | 1100 |
| B (11) | 1011 |
| A (10) | 1010 |
(ABCD)16 = (1010101111001101)2
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 101 | 5 |
| 001 | 1 |
| 111 | 7 |
| 101 | 5 |
| 010 | 2 |
| 001 | 1 |
(ABCD)16 = (125715)8
Convert the following octal numbers to binary:
(a) 123
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 3 | 011 |
| 2 | 010 |
| 1 | 001 |
Therefore, (123)8 = ()2
(b) 3527
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 7 | 111 |
| 2 | 010 |
| 5 | 101 |
| 3 | 011 |
Therefore, (3527)8 = ()2
(c) 705
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 5 | 101 |
| 0 | 000 |
| 7 | 111 |
Therefore, (705)8 = ()2
Convert the following octal numbers to binary:
(a) 7642
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 2 | 010 |
| 4 | 100 |
| 6 | 110 |
| 7 | 111 |
Therefore, (7642)8 = ()2
(b) 7015
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 5 | 101 |
| 1 | 001 |
| 0 | 000 |
| 7 | 111 |
Therefore, (7015)8 = ()2
(c) 3576
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 6 | 110 |
| 7 | 111 |
| 5 | 101 |
| 3 | 011 |
Therefore, (3576)8 = ()2
(d) 705
Answer
| Octal Number | Binary Equivalent |
|---|---|
| 5 | 101 |
| 0 | 000 |
| 7 | 111 |
Therefore, (705)8 = ()2
Convert the following binary numbers to octal
(a) 111010
Answer
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 010 | 2 |
| 111 | 7 |
Therefore, (111010)2 = (72)8
(b) 110110101
Answer
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 101 | 5 |
| 110 | 6 |
| 110 | 6 |
Therefore, (110110101)2 = (665)8
(c) 1101100001
Answer
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 001 | 1 |
| 100 | 4 |
| 101 | 5 |
| 001 | 1 |
Therefore, (1101100001)2 = (1541)8
Convert the following binary numbers to octal
(a) 11001
Answer
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 001 | 1 |
| 011 | 3 |
Therefore, (11001)2 = (31)8
(b) 10101100
Answer
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 100 | 4 |
| 101 | 5 |
| 010 | 2 |
Therefore, (10101100)2 = (254)8
(c) 111010111
Answer
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 111 | 7 |
| 010 | 2 |
| 111 | 7 |
Therefore, (111010111)2 = (727)8
Add the following binary numbers:
(i) 10110111 and 1100101
Answer
Therefore, (10110111)2 + (1100101)2 = (100011100)2
(ii) 110101 and 101111
Answer
Therefore, (110101)2 + (101111)2 = (1100100)2
(iii) 110111.110 and 11011101.010
Answer
Therefore, (110111.110)2 + (11011101.010)2 = (100010101)2
(iv) 1110.110 and 11010.011
Answer
Therefore, (1110.110)2 + (11010.011)2 = (101001.001)2
Given that A's code point in ASCII is 65, and a's code point is 97. What is the binary representation of 'A' in ASCII ? (and what's its hexadecimal representation). What is the binary representation of 'a' in ASCII ?
Answer
Binary representation of 'A' in ASCII will be binary representation of its code point 65.
Converting 65 to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 65 | 1 (LSB) |
| 2 | 32 | 0 |
| 2 | 16 | 0 |
| 2 | 8 | 0 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, binary representation of 'A' in ASCII is 1000001.
Converting 65 to Hexadecimal:
| 16 | Quotient | Remainder |
|---|---|---|
| 16 | 65 | 1 |
| 16 | 4 | 4 |
| 0 |
Therefore, hexadecimal representation of 'A' in ASCII is (41)16.
Similarly, converting 97 to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 97 | 1 (LSB) |
| 2 | 48 | 0 |
| 2 | 24 | 0 |
| 2 | 12 | 0 |
| 2 | 6 | 0 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, binary representation of 'a' in ASCII is 1100001.
Convert the following binary numbers to decimal, octal and hexadecimal numbers.
(i) 100101.101
Answer
Decimal Conversion of integral part:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 | 20 | 1 | 1x1=1 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 0 | 23 | 8 | 0x8=0 |
| 0 | 24 | 16 | 0x16=0 |
| 1 | 25 | 32 | 1x32=32 |
Decimal Conversion of fractional part:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 1 | 2-1 | 0.5 | 1x0.5=0.5 |
| 0 | 2-2 | 0.25 | 0x0.25=0 |
| 1 | 2-3 | 0.125 | 1x0.125=0.125 |
Equivalent decimal number = 1 + 4 + 32 + 0.5 + 0.125 = 37.625
Therefore, (100101.101)2 = (37.625)10
Octal Conversion
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 101 | 5 |
| 100 | 4 |
| . | . |
| 101 | 5 |
Therefore, (100101.101)2 = (45.5)8
Hexadecimal Conversion
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 0101 | 5 |
| 0010 | 2 |
| . | |
| 1010 | A (10) |
Therefore, (100101.101)2 = (25.A)16
(ii) 10101100.01011
Answer
Decimal Conversion of integral part:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 | 20 | 1 | 0x1=0 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 | 23 | 8 | 1x8=8 |
| 0 | 24 | 16 | 0x16=0 |
| 1 | 25 | 32 | 1x32=32 |
| 0 | 26 | 64 | 0x64=0 |
| 1 | 27 | 128 | 1x128=128 |
Decimal Conversion of fractional part:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 | 2-1 | 0.5 | 0x0.5=0 |
| 1 | 2-2 | 0.25 | 1x0.25=0.25 |
| 0 | 2-3 | 0.125 | 0x0.125=0 |
| 1 | 2-4 | 0.0625 | 1x0.0625=0.0625 |
| 1 | 2-5 | 0.03125 | 1x0.03125=0.03125 |
Equivalent decimal number = 4 + 8 + 32 + 128 + 0.25 + 0.0625 + 0.03125 = 172.34375
Therefore, (10101100.01011)2 = (172.34375)10
Octal Conversion
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 100 | 4 |
| 101 | 5 |
| 010 | 2 |
| . | . |
| 010 | 2 |
| 110 | 6 |
Therefore, (10101100.01011)2 = (254.26)8
Hexadecimal Conversion
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1100 | C (12) |
| 1010 | A (10) |
| . | |
| 0101 | 5 |
| 1000 | 8 |
Therefore, (10101100.01011)2 = (AC.58)16
(iii) 1010
Answer
Decimal Conversion:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 | 20 | 1 | 0x1=0 |
| 1 | 21 | 2 | 1x2=2 |
| 0 | 22 | 4 | 0x4=0 |
| 1 | 23 | 8 | 1x8=8 |
Equivalent decimal number = 2 + 8 = 10
Therefore, (1010)2 = (10)10
Octal Conversion
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 010 | 2 |
| 001 | 1 |
Therefore, (1010)2 = (12)8
Hexadecimal Conversion
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1010 | A (10) |
Therefore, (1010)2 = (A)16
(iv) 10101100.010111
Answer
Decimal Conversion of integral part:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 | 20 | 1 | 0x1=0 |
| 0 | 21 | 2 | 0x2=0 |
| 1 | 22 | 4 | 1x4=4 |
| 1 | 23 | 8 | 1x8=8 |
| 0 | 24 | 16 | 0x16=0 |
| 1 | 25 | 32 | 1x32=32 |
| 0 | 26 | 64 | 0x64=0 |
| 1 | 27 | 128 | 1x128=128 |
Decimal Conversion of fractional part:
| Binary No | Power | Value | Result |
|---|---|---|---|
| 0 | 2-1 | 0.5 | 0x0.5=0 |
| 1 | 2-2 | 0.25 | 1x0.25=0.25 |
| 0 | 2-3 | 0.125 | 0x0.125=0 |
| 1 | 2-4 | 0.0625 | 1x0.0625=0.0625 |
| 1 | 2-5 | 0.03125 | 1x0.03125=0.03125 |
| 1 | 2-6 | 0.015625 | 1x0.015625=0.015625 |
Equivalent decimal number = 4 + 8 + 32 + 128 + 0.25 + 0.0625 + 0.03125 + 0.015625 = 172.359375
Therefore, (10101100.010111)2 = (172.359375)10
Octal Conversion
Grouping in bits of 3:
| Binary Number | Equivalent Octal |
|---|---|
| 100 | 4 |
| 101 | 5 |
| 010 | 2 |
| . | . |
| 010 | 2 |
| 111 | 7 |
Therefore, (10101100.010111)2 = (254.27)8
Hexadecimal Conversion
Grouping in bits of 4:
| Binary Number | Equivalent Hexadecimal |
|---|---|
| 1100 | C (12) |
| 1010 | A (10) |
| . | |
| 0101 | 5 |
| 1100 | C (12) |
Therefore, (10101100.010111)2 = (AC.5C)16