[prev] 42 [next]

Sidetrack: Numeral Systems (cont)

Conversion between binary and hexadecimal
01234567
00000001001000110100010101100111
89ABCDEF
10001001101010111100110111101111
  • Binary to hexadecimal
    • Collect bits into groups of four starting from right to left
    • "pad" out left-hand side with 0's if necessary
    • Convert each group of four bits into its equivalent hexadecimal representation   (given in table above)
  • Hexadecimal to binary
    • Reverse the previous process
    • Convert each hex digit into equivalent 4-bit binary representation