# Fun With Address Spaces

## When you write down a complete set of binary numerals of a certain size and in order,
some interesting things jump out at you

## Let's look at a small example

- There are 32 5-bit numbers: 0...31
- Here they are written out in order as binary numerals:

## There are some patterns here that you need to notice:

- Look first at the leftmost array
- The green lines divide our 32 numerals into 8 groups of 4
- To the right of the red line, the groups just count (0, 1, 2, 3) over and over
- To the left of the red line, each group has the same pattern of bits on all 4 lines
- As you go from group to group, these patterns also count: 0, 1, 2, 3, 4, 5, 6, 7
- Moving the red line left or right generates a similar pattern with different group sizes
- This always happens whatever the size of the binary representations
- That is, we get these same patterns with 32-bit numerals, but we won't try to write all of them out
- The rightmost of the tables in the figure also gives a demonstration of why adding one more bit
to our address space doubles the number of addresses available