Converting between Hexadecimal, Decimal, and Binary
Decimal to Binary:
-
Find the largest multiple of eight in the number.
-
Find the largest 8-bit digit in the decimal number.
-
Write all 8-bit numbers starting with the largest 8-bit digit.
-
For the numbers that go into the remaining amount of the decimal number, write a one. For the numbers that do not go into it, write a zero.
e.g. 279
Largest 8-bit digit in 279 is 256
| 8-bit | Binary |
------------------
|256 |1 |
|128 |0 |
|64 |0 |
|32 |0 |
|16 |1 |
|8 |0 |
|4 |1 |
|2 |1 |
|1 |1 |
279 in binary is 100010111
• • •
Decimal to Hexadecimal:
-
Find how many times 16decimal place goes into the number. Write that number.
-
Find the remainder of the previous division. If it is greater than 15, continue to divide by 16decimal place. If it is less than or equal to 15, write the appropriate hex number.
-
0 through 9 are all written the same.
-
10 is A, 11 is B, 12 is C, 13 is D, 14 is E, 15 is F.
e.g. 74
Divide 74 by 16 = four. Remainder is 10.
Write four.
Write remainder which is 10 as A.
74 in hexadecimal is 4A
• • •
Binary to Decimal:
-
Write out binary number.
-
From the right, right the octal numbers according to length.
-
If it is a zero, do not add to the sum. If it is a one, add the octal number to the sum.
e.g. 100101
100101 has the numbers 32 16 8 4 2 1
Since there is a 1 at the 32 spot, add 32 to the sum. Continue through the number adding all of the numbers with ones.
100101 in decimal is 37
• • •
Binary to Hexadecimal:
insert information here.
• • •
Hexadecimal to Decimal:
insert information here.
• • •
Hexadecimal to Binary:
insert information here.
Decimal to ASCII:
insert information here.