Computer Science
Convert the following binary numbers to decimal, octal and hexadecimal numbers.
(i) 100101.101
(ii) 10101100.01011
(iii) 1010
(iv) 10101100.010111
Number System
65 Likes
Answer
(i) 100101.101
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
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
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
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
Answered By
8 Likes
Related Questions
Convert the following binary numbers to octal
(a) 11001
(b) 10101100
(c) 111010111
Add the following binary numbers:
(i) 10110111 and 1100101
(ii) 110101 and 101111
(iii) 110111.110 and 11011101.010
(iv) 1110.110 and 11010.011
Convert the following binary numbers to octal
(a) 111010
(b) 110110101
(c) 1101100001
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 ?