Blog Pages

Convert From Binary to Decimal

1. Get the last digit of the hex number, call this digit the currentDigit.  
2. Make a variable, let's call it power.  Set the value to 0.
3. Multiply the current digit with (2^power), store the result.
4. Increment power by 1.
5. Set the the currentDigit to the previous digit of the hex number.
6. Repeat step 3 until all digits have been multiplied.
7. Sum the result of step 3 to get the answer number.

1010001 = 81
(1*1) + (0*2) + (0*4) + (0*8) + (1*16) + (0*32) + (1*64) =
  1   +   0   +   0   +   0   +   16   +   0    +   64   = 81


Binary / Decimal Converter Calculator:

"There are 10 types of people in this world. Those who do understand binary and those who don't." :-)

No comments:

Post a Comment