12-15-2004, 04:11 AM
I learned how to convert decimal to binary this way.
Here's an example, from 63 to binary.
the first number is always 1
divide 63 by 2, come up with 31, remainder 1
divide 31 by 2, come up with 15, remainder 1
divide 15 by 2, come up with 7, remainder 1
divide 7 by 2, come up with 3, remainder 1
divide 3 by 2, come up with 1, remainder 1
Put all the remainders together, and you come up with binary number 111111. Put this example in windows calculator and you get the same.
But when I do this for number 11 I get this
First number 1
Divide by 11, get 5, remainder 1
Divide 5 by 2, get 2, remaidner 1
Divide 2 by 2, get 0, remainder 0.
Binary number is 1110. But when I put this in windows calculator, I get 1011. What am I doing wrong ? Thanks for any help!
Here's an example, from 63 to binary.
the first number is always 1
divide 63 by 2, come up with 31, remainder 1
divide 31 by 2, come up with 15, remainder 1
divide 15 by 2, come up with 7, remainder 1
divide 7 by 2, come up with 3, remainder 1
divide 3 by 2, come up with 1, remainder 1
Put all the remainders together, and you come up with binary number 111111. Put this example in windows calculator and you get the same.
But when I do this for number 11 I get this
First number 1
Divide by 11, get 5, remainder 1
Divide 5 by 2, get 2, remaidner 1
Divide 2 by 2, get 0, remainder 0.
Binary number is 1110. But when I put this in windows calculator, I get 1011. What am I doing wrong ? Thanks for any help!