Joshua Deakin

blog

< previous next >

2016.01.18 - Binary is pretty

What does counting sound like?

Binary has a cool pattern when we count upwards in positive integers from zero.

You can listen to this pattern in the audio clip above.

Counting upwards in binary numbers (Positive Integer from zero).
----->
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Binary numbers repeating pattern:

0 1 ---repeats-->
0 0 1 1 ---repeats-->
0 0 0 0 1 1 1 1 ---repeats-->
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 ---repeats-->
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ---repeats-->

With 0's removed:

  1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
    1 1     1 1     1 1     1 1     1 1     1 1     1 1     1 1
        1 1 1 1         1 1 1 1         1 1 1 1          1 1 1 1
                1 1 1 1 1 1 1 1                 1 1 1 1 1 1 1 1
                                1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

The first digit will always repeat: 0, 1, 0, 1, 0, 1, etc.
The second digit will have the same pattern,
but with two zeros in place of each zero,
and two ones in place of each one:
0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 ... and so on.

The nth digit will have twice as many zeros in place of each zero of the (n - 1)th digit,
as well as twice as many ones in place of each one of the (n - 1)th digit.
< previous next >