|
Question 1105379: Convert 82.11 to binary
Found 2 solutions by Alan3354, greenestamps: Answer by Alan3354(69443) (Show Source):
You can put this solution on YOUR website! Convert 82.11 to binary
----
the integer part is easy.
82 = 5*16 + 2
--> 1010000 + 10 = 1010010
=============
Assuming you mean just 0.11 and not repeating 0.11.... = 1/9 :
---
11/100 = 1011/1100100
0.11 in binary is repeating.
Doing the long division gives in binary:
0.00011100001010001111
-------
In Hex, it's 0.1C28F5C28F5C28F5C28F... (base 16)
The repeating is obvious in Hex.
82.11 in Hex --> 52.1C28F5C28F5C28F5C28F...
----
Hex and binary are just a matter of grouping.
Each Hex character --> 4 binary 0's and 1's
Answer by greenestamps(13200) (Show Source):
You can put this solution on YOUR website!
Let me expand on the solution provided by the other tutor. His work is fine, except that somehow a few digits got left off of one of his answers. But he doesn't show much of the work he did to get his answers. Perhaps he is familiar with operations in binary and hexadecimal and can do them easily; I would guess that probably you are not....
So here is his response, edited to show my additional inputs.
----------------------
(his input)
the integer part is easy.
82 = 5*16 + 2
--> 1010000 + 10 = 1010010
=============
(my input)
What he did there is recognize that 82 is 2 more than some multiple of a power of 2: 82 = 80+2 = 5*16+2 = 5(2^4)+2. So to convert 82 to binary he did
5 = 101
5*2^4 = 5*16 = 101*10000 = 1010000
5*2^4+2 = 5*16+2 = 1010000+10 = 1010010 = 82
While that is a good way to do the conversion, a student who is not well versed in the topic will not do it that way. Here is a standard method for performing the conversion.
We repeatedly divide the give number by 2 and pick off the remainders; that gives us the digits of the binary representation of the number, starting with the rightmost digit.
82/2 = 41 R 0
41/2 = 20 R 1
20/2 = 10 R 0
10/2 = 5 R 0
5/2 = 2 R 1
2/2 = 1 R 0
1/2 = 0 R 1
The binary representation of 82 is those remainders in reverse order: 82 (decimal) = 1010010 (binary).
We can do the conversion faster if we convert from decimal to hexadecimal; we do fewer divisions, and converting from hexadecimal to binary is easy and fast:
82/16 = 5 R 2
5/16 = 0 R 5
82 (decimal) = 52 (hexadecimal)
(NOTE: possibly that is how the other tutor did his conversion....)
---------------
(his input)
Assuming you mean just 0.11 and not repeating 0.11.... = 1/9 :
---
11/100 = 1011/1100100
0.11 in binary is repeating.
Doing the long division gives in binary:
0.00011100001010001111
-------
(my input)
There he didn't show you how he did the long division; for most people, long division in binary (or any base other than our familiar base 10) is very difficult. So I will show you a way to do the conversion of the fractional part of the decimal number that only uses arithmetic in base 10.
Also note that for some reason the binary string he shows is incomplete; some digits are missing at the end. The full binary representation of 0.11 (decimal) is 0.0001_11000010100011110101 with everything after the "_" repeating.
(the last four binary digits of the repeating part "0101" got lost in his response)
--------
(his input)
In Hex, it's 0.1C28F5C28F5C28F5C28F... (base 16)
The repeating is obvious in Hex.
82.11 in Hex --> 52.1C28F5C28F5C28F5C28F...
----
Hex and binary are just a matter of grouping.
Each Hex character --> 4 binary 0's and 1's
-------
(my input)
Here is how you can convert the fractional part of the given number to binary using base 10 arithmetic.
Since we saw earlier that it is faster to convert from decimal to hexadecimal and then from hexadecimal to binary, I will do the conversion that way.
In this process, we repeatedly multiply the decimal part by 16 and pick off the whole number parts of the result; those whole number parts are the hexadecimal digits of the representation of the number.
.11*16 = 1.76 --> 1st hex digit 1
.76*16 = 12.16 --> 2nd hex digit C (=12)
.16*16 = 2.56 --> 3rd hex digit 2
.56*16 = 8.96 --> 4th hex digit 8
.96*16 = 15.36 --> 5th hex digit F (=15)
.36*16 = 5.76 --> 6th hex digit 5
.76*16 = 12.16 --> 7th hex digit C
Here we see the hex digits starting to repeat, so we know the repeating hex representation: 0.11 (decimal) = 0.1C28F5C28F5C28F5C28F5...
Then converting that to binary, by converting each hex digit to 4 binary digits, we get the binary representation: 0.0001_11000010100011110101_11000010100011110101...
I hope this additional input to your question is helpful.
|
|
|
| |