Convert decimal into binary
Example 9:
We have to find out binary value in given decimal number 220 and tell me which class it comes from ?
Note: You should always follow from left to right
Solution:
It comes from class C value given in above
Base position 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
Decimal value 128 64 32 16 8 4 2 1
Binary value 1 1 0 1 1 1 0 0
After completing we can check by adding all "1"s given below;
128 + 64 + 16 + 8 + 4 = 220
Rough note:
We can do this adding method given below;
Decimal calculations Bit in binary
128 is less than 220 on the bit
128 + 64 = 192 is less than to 220 on the bit
128 + 64 + 32 = 224 is greater than 200 off the bit
128 + 64 + 0 + 16 = 208 is less than 220 on the bit
128 + 64 + 0 + 16 + 8 = 216 is less than 220 on the bit
128 + 64 + 0 + 16 + 8 + 4 = 220 is equivalent to 220 on the bit
128 + 64 + 0 + 16 + 8 + 4 + 2 = 222 is greater than 220 off the bit
128 + 64 + 0 + 16 + 8 + 4 + 0 + 1 = 221 is greater than 220 off the bit
This is another way of doing through subtracting method which is done in a simple and easy way given below;
Decimal calculation Bit in binary
220 - 128 = 92 is less than 220 on the bit
92 - 64 = 28 is less than 220 on the bit
28 - 32 cannot be subtracted off the bit
28 - 16 = 12 is less than 220 on the bit
12 - 8 = 4 is less than 220 on the bit
4 - 4 = 0 is less than 220 on the bit
0 - 2 cannot be subtracted off the bit
0 - 1 cannot be subtracted off the bit
Therefore, this is our binary value 11011100.
Example 9:
We have to find out binary value in given decimal number 220 and tell me which class it comes from ?
Note: You should always follow from left to right
Solution:
It comes from class C value given in above
Base position 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
Decimal value 128 64 32 16 8 4 2 1
Binary value 1 1 0 1 1 1 0 0
After completing we can check by adding all "1"s given below;
128 + 64 + 16 + 8 + 4 = 220
Rough note:
We can do this adding method given below;
Decimal calculations Bit in binary
128 is less than 220 on the bit
128 + 64 = 192 is less than to 220 on the bit
128 + 64 + 32 = 224 is greater than 200 off the bit
128 + 64 + 0 + 16 = 208 is less than 220 on the bit
128 + 64 + 0 + 16 + 8 = 216 is less than 220 on the bit
128 + 64 + 0 + 16 + 8 + 4 = 220 is equivalent to 220 on the bit
128 + 64 + 0 + 16 + 8 + 4 + 2 = 222 is greater than 220 off the bit
128 + 64 + 0 + 16 + 8 + 4 + 0 + 1 = 221 is greater than 220 off the bit
This is another way of doing through subtracting method which is done in a simple and easy way given below;
Decimal calculation Bit in binary
220 - 128 = 92 is less than 220 on the bit
92 - 64 = 28 is less than 220 on the bit
28 - 32 cannot be subtracted off the bit
28 - 16 = 12 is less than 220 on the bit
12 - 8 = 4 is less than 220 on the bit
4 - 4 = 0 is less than 220 on the bit
0 - 2 cannot be subtracted off the bit
0 - 1 cannot be subtracted off the bit
Therefore, this is our binary value 11011100.
No comments:
Post a Comment