Computer Science
Convert the following decimal numbers to binary:
(a) 19
(b) 122
(c) 161
(d) 0.675
Number System
26 Likes
Answer
(a) 19
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
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
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
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
Answered By
5 Likes
Related Questions
Convert the following decimal numbers to octal:
(a) 19
(b) 122
(c) 161
(d) 0.675
Convert the following decimal numbers to binary:
(a) 23
(b) 100
(c) 145
(d) 0.25
Convert the following binary numbers to decimal :
(a) 1100
(b) 10010101
(c) 11011100
Convert the following hexadecimal numbers to binary:
(a) A6
(b) A07
(c) 7AB4