Related Bases 3
What about converting in the other direction?
Let's convert D5F8 hex to binary.
- start at the right end of the numeral
- convert each hex digit to a group of 4 bits; be sure to use all 4 bits, including leading zeroes
- 8 in binary is 1000
- F = 15, which is 1111
- 15 divided by 2 is 7 with a remainder of 1
- 7 divided by 2 is 3 with a remainder of 1
- 3 divided by 2 is 1 with a remainder of 1
- 1 divided by 2 is 0 with a remainder of 1
- 5 is 0101
- D = 13, which is 1101
- 13 divided by 2 is 6 with a remainder of 1
- 6 divided by 2 is 3 with a remainder of 0
- 3 divided by 2 is 1 with a remainder of 1
- 1 divided by 2 is 0 with a remainder of 1
- that is 1101 (don't forget about the right-to-left part)
- now just stick them all together in the correct order:
- 1101-0101-1111-1000
- and removing the grouping markers we get 1101010111111000