# Related Bases 2

## We do care about base 16

## 16 = 2^{4}, so we can convert from base 2 to base 16 by using groups of 4

## We use the name 'hexadecimal" for base 16, or "hex" for short

### Why do we care about base 16? Imagine a binary representation like 10110101100110100010101101010:

- now imagine trying to copy it from your computer screen to a piece of paper that's behind you;
that's pretty onerous
- now imagine doing the same with 16B3456A; I hope you think that's much less onerous
- remember that 16 = 2
^{4},
so we need to bunch the binary into groups of 4 (**starting at the right**)
- 1-0110-1011-0011-0100-0101-0110-1010
- now convert each group separately from binary to hex, and we get 16B3456A
- "what's with the A and B?" I hear you ask
- well, we're converting to base 16, so we need 16 digits
- 0-9 gives us 10 of them, so we need 6 more
- ages ago somebody decided to use A-F; they seem to work, so we're sticking with them
- A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15 (one less than our base)
- you don't need to memorize these; just remember that A is the next one after 9 (i.e. 10)
- you can count from there; why do you think that God put five fingers on your hand?

- let's look at a few of the separate conversions:
- 0011 is 2 + 1 = 3
- 0110 is 4 + 2 = 6
- 0101 is 4 + 1 = 5
- 1010 is 8 + 2 = 10, which is represented by the digit A
- 1011 is 8 + 2 + 1 = 11, which is represented by the digit B
- with a little practice, you can do them in your head