KnowledgeBoat Logo

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

2QuotientRemainder
2191 (LSB)
291
240
220
211 (MSB)
 0 

Therefore, (19)10 = (10011)2

(b) 122

2QuotientRemainder
21220 (LSB)
2611
2300
2151
271
231
211 (MSB)
 0 

Therefore, (122)10 = (1111010)2

(c) 161

2QuotientRemainder
21611 (LSB)
2800
2400
2200
2100
251
220
211 (MSB)
 0 

Therefore, (161)10 = (10100001)2

(d) 0.675

Multiply=ResultantCarry
0.675 x 2=0.351
0.35 x 2=0.70
0.7 x 2=0.41
0.4 x 2=0.80
0.8 x 2=0.61

(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