Professional Documents
Culture Documents
CS101 Assignment Solution
CS101 Assignment Solution
Muhammad Azam
BC123456789
Question#1:
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.
2 3242 Remainder
2 1621 0
2 810 1
2 405 0
2 202 1
2 101 0
2 50 1
2 25 0
2 12 1
2 6 0
2 3 0
2 1 1
0 1
110010101010 =0*20+1*21+0*22+1*23+0*24+1*25+0*26+1*27+0*28+0*29+1*210+1*211
=0+2+0+8+0+32+0+128+0+0+1024+2048
Decimal form=3242
Question#2:
0 0 0 0 1 1 1 1 0 0
0 0 1 0 1 0 1 1 0 0
0 1 0 1 1 1 1 1 0 0
0 1 1 1 1 0 1 1 0 0
1 0 0 1 0 1 0 0 1 1
1 0 1 1 0 0 1 0 1 1
1 1 0 0 0 1 0 1 1 0
1 1 1 0 0 0 1 1 0 0