CS101 Assignment 1 Solution..
CS101 Assignment 1 Solution..
(CS101)
Assignment # 01 30 November 2020
Fall 2020
Convert the following decimal numbers into equivalent binary numbers and then convert the
binary answer back into equivalent decimal. Show all the steps of conversions.
4789
Solution Decimal to Binary
212 211 210 29 28 27 26 25 24 23 22 21 20
4096 2048 1024 512 256 128 64 32 16 8 4 2 1
1 0 0 1 0 1 0 1 1 0 1 0 1
4789= (1001010110101)2
-8735= (110001000011111)2
Solution Binary to Decimal to
-8735
8192+512+16+8+4+2+1=-8735
(110001000011111)2 =-8735