In Figure 1.6 we show how to convert a decimal number into binary by successivel
ID: 3877177 • Letter: I
Question
In Figure 1.6 we show how to convert a decimal number into binary by successively dividing by 2. Another way to derive the same answer is to construct the number by using powers of 2. For example, if we wish to convert the number (23)o, then the largest power of 2 that is not larger than 23 is 24-16. Hence, the binary number will have five bits and the most-significant bit is ba-1. We then perform the subtraction 23-16-7. Now, the largest power of 2 that is not larger than 7 is 2-4. Hence, ba-0 (because 2-8 is larger than 7) and bi 1. Continuing this process gives . 23-16+4+2+1 24+22+21+20 = 10000+00100+00010+00001 =10111 Using this method, convert the following decimal numbers into binary. (a) 8 bit-(93)10 (b) 8 bit - (121ho (c) 16 bit -(506)10 (d) 16 bit - (740)10 (e) 16 bit (11721o (f) 16 bit (4415)10Explanation / Answer
// sorry for the poor formatting.
// the chegg editor works different from ms word.
// plz paste this in any word processing tools such as ms word or libre office.
// plz comment if you need any clarification.
Before solving these questions, lets get some basic knowledge on binary numbers,
Powers of 2 in decimal system are, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 …. And so on.
When we convert any decimal number to binary, we should find one of the above numbers which is, the largest number that is less than the given decimal number. After that we can start converting the number in to binary by doing simple subtractions and repeating the above technique again and again.
a) Given number : (93)10
This number can be written in sum of powers of two as follows,
Highest Power of 2 less than 93 is 64, so
93 = 64 + (93-64)
=> = 64 + 29
=> = 64 + 16 + (29 - 16)
=> = 64 + 16 + 13
=> = 64 + 16 + 8 + (13 - 8)
=> = 64 + 16 + 8 + 5
=> = 64 + 16 + 8 + 4 + 1
So the binary number would be,
0100 0000 is 64
0001 0000 is 16
0000 1000 is 8
0000 0100 is 4
0000 0001 is 1
-------------------------------------------------------
0101 1101 is 93
b) Given number : (121)10
This number can be written in sum of powers of two as follows,
Highest Power of 2 less than 121 is 64, so
121 = 64 + (121-64)
=> = 64 + 57
=> = 64 + 32 + (57 - 32)
=> = 64 + 32 + 25
=> = 64 + 32 + 16 + (25 - 16)
=> = 64 + 32 + 16 + 9
=> = 64 + 32 + 16 + 8 + 1
So the binary number would be,
0100 0000 is 64
0010 0000 is 32
0001 0000 is 16
0000 1000 is 8
0000 0001 is 1
----------------------------------------------------
0111 1001 is 121
c) Given number : (506)10
This number can be written in sum of powers of two as follows,
Highest Power of 2 less than 506 is 256, so
506 = 256 + (506-256)
=> = 256 + 250
=> = 256 + 128 + (250 - 128)
=> = 256 + 128 + 122
=> = 256 + 128 + 64 + (122 - 64)
=> = 256 + 128 + 64 + 58
=> = 256 + 128 + 64 + 32 + (58 - 32)
=> = 256 + 128 + 64 + 32 + 26
=> = 256 + 128 + 64 + 32 + 16 + (26 - 16)
=> = 256 + 128 + 64 + 32 + 16 + 10
=> = 256 + 128 + 64 + 32 + 16 + 8 + (10 - 8)
=> = 256 + 128 + 64 + 32 + 16 + 8 + 2
So the binary number would be,
0000 0001 0000 0000 is 256
0000 0000 1000 0000 is 128
0000 0000 0100 0000 is 64
0000 0000 0010 0000 is 32
0000 0000 0001 0000 is 16
0000 0000 0000 1000 is 8
0000 0000 0000 0010 is 2
-----------------------------------------------------------
0000 0001 1111 1010 is 506
d) Given number : (740)10
This number can be written in sum of powers of two as follows,
Highest Power of 2 less than 740 is 512, so
740 = 512 + (740 - 512)
=> = 512 + 228
=> = 512 + 128 + (228 - 128)
=> = 512 + 128 + 100
=> = 512 + 128 + 64 + (100 - 64)
=> = 512 + 128 + 64 + 36
=> = 512 + 128 + 64 + 32 + (36 - 32)
=> = 512 + 128 + 64 + 32 + 4
So the binary number would be,
0000 0010 0000 0000 is 512
0000 0000 1000 0000 is 128
0000 0000 0100 0000 is 64
0000 0000 0010 0000 is 32
0000 0000 0000 0100 is 8
---------------------------------------------------------
0000 0010 1110 0100 is 740
e) Given number : (1172)10
This number can be written in sum of powers of two as follows,
Highest Power of 2 less than 1172 is 1024, so
1172 = 1024 + (1172 - 1024)
=> = 1024 + 148
=> = 1024 + 128 + (148 - 128)
=> = 1024 + 128 + 20
=> = 1024 + 128 + 16 + (20 - 16)
=> = 1024 + 128 + 16 + 4
So the binary number would be,
0000 0100 0000 0000 is 1024
0000 0000 1000 0000 is 128
0000 0000 0001 0000 is 16
0000 0000 0000 0100 is 4
-----------------------------------------------------
0000 0100 1001 0100 is 1172
f) Given number : (4415)10
This number can be written in sum of powers of two as follows,
Highest Power of 2 less than 4415 is 4098, so
4415 = 4098 + (4415 - 4098)
=> = 4096 + 319
=> = 4098 + 256 + (319 - 256)
=> = 4098 + 256 + 63
=> = 4098 + 256 + 32 + (63 - 32)
=> = 4098 + 256 + 32 + 31
=> = 4098 + 256 + 32 + 16 + (31 - 16)
=> = 4098 + 256 + 32 + 16 + 15
=> = 4098 + 256 + 32 + 16 + 8 + (14 - 8)
=> = 4098 + 256 + 32 + 16 + 8 + 7
=> = 4098 + 256 + 32 + 16 + 8 + 4 + 2 + 1
So the binary number would be,
0001 0000 0000 0000 is 4096
0000 0001 0000 0000 is 256
0000 0000 0010 0000 is 32
0000 0000 0001 0000 is 16
0000 0000 0000 1000 is 8
0000 0000 0000 0100 is 4
0000 0000 0000 0010 is 2
0000 0000 0000 0001 is 1
-------------------------------------------------------
0001 0001 0011 1111 is 4415
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.