Computer Science
Convert binary number into decimal number.
(a) 10111
(b) 111101
(c) 101010.011
(d) 101101
Number System
2 Likes
Answer
(a) 10111
Binary No | Power | Value | Result |
---|---|---|---|
1 (LSB) | 20 | 1 | 1x1=1 |
1 | 21 | 2 | 1x2=2 |
1 | 22 | 4 | 1x4=4 |
0 | 23 | 8 | 0x8=0 |
1 (MSB) | 24 | 16 | 1x16=16 |
Equivalent decimal number = 1 + 2 + 4 + 16 = 23
Therefore, (10111)2 = (23)10.
(b) 111101
Binary No | Power | Value | Result |
---|---|---|---|
1 (LSB) | 20 | 1 | 1x1=1 |
0 | 21 | 2 | 0x2=0 |
1 | 22 | 4 | 1x4=4 |
1 | 23 | 8 | 1x8=8 |
1 | 24 | 16 | 1x16=16 |
1 (MSB) | 25 | 32 | 1x32=32 |
Equivalent decimal number = 1 + 4 + 8 + 16 + 32 = 61
Therefore, (111101)2 = (61)10.
(c) 101010.011
For the integer part (101010):
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 |
0 | 24 | 16 | 0x16=0 |
1 (MSB) | 25 | 32 | 1x32=32 |
Equivalent decimal number = 2 + 8 + 32 = 42
For the fractional part (0.011):
Binary No | Power | Value | Result |
---|---|---|---|
0 (LSB) | 2-1 | 0.5 | 0x0.5=0 |
1 | 2-2 | 0.25 | 1x0.25=0.25 |
1 | 2-3 | 0.125 | 1x0.125=0.125 |
Equivalent decimal number = 0.25 + 0.125 = 0.375
Therefore, (101010.011)2 = (42.375)10.
(d) 101101
Binary No | Power | Value | Result |
---|---|---|---|
1 (LSB) | 20 | 1 | 1x1=1 |
0 | 21 | 2 | 0x2=0 |
1 | 22 | 4 | 1x4=4 |
1 | 23 | 8 | 1x8=8 |
0 | 24 | 16 | 0x16=0 |
1 (MSB) | 25 | 32 | 1x32=32 |
Equivalent decimal number = 1 + 4 + 8 + 32 = 45
Therefore, (101101)2 = (45)10.
Answered By
1 Like