Computer Science, asked by king8542, 1 year ago

lb - Computer
Convert Dec into binary & prove it. 222, 345, 876, 85, 111.​

Answers

Answered by gurukulamdivya
0

Answer:

To convert any decimal number into binary number we have divide it 2 and keep track of the remainder

2 | 222 |

2 | 111  | 0

2 | 55 |  1

2 | 27 |  1

2 |  13 | 1

2 |  6 | 1

2 | 3 | 0

2 | 1  | 1

now binary number of the decimal 222 = 11011110

to check the answer we have to find the sum of multiply binary digit with the exponent power of 2 increasing from right to left, like this

(1*2^7)+(1*2^6)+(0*2^5)+(1*2^4)+(1*2^3)+(1*2^2)+(1*2^1)+(0*2^0)

=(1*128)+(1*64)+(0*32)+(1*16)+(1*8)+(1*4)+(1*2)+(0*1)

=128+64+0+16+8+4+2+0

=222

Similarly for the next number that is 876

2 | 876 |

2 | 438 | 0

2 | 219 | 0

2 | 109 | 1

2 | 54 | 1

2 | 27 | 0

2 | 13 | 1

2 | 6 | 1

2 | 3 | 0

2 | 1 | 1

1101101100

so binary of decimal number 876 = 1101101100

Same process is to be applied to check the answer

(1*2^9)+(1*2^8)+(0*2^7)+(1*2^6)+(1*2^5)+(0*2^4)+(1*2^3)+(1*2^2)+(0*2^1)+(0*2^0)

= (1*512)+(1*256)+(0*128)+(1*64)+(1*32)+(0*16)+(1*8)+(1*4)+(0*2)+(0*1)

=512+256+0+64+32+0+8+4+0+0

= 876

Similarly for the rest

Binary for

345 = 101011001

85 = 1010101

111 = 1101111

Similar questions