At the heart of every computer, however complex, are binary numbers – that is, numbers formed only of 0’s and 1’s. This is because it is easy to represent just two digits electronically: a switch can be on or off; a current can flow one way or the other; a pulse can change a stored digit from one state to the other.

**How does the binary system work? **When we count up to 9 in the decimal system, we’ve run out of digits. After that, we put a 1 in the “tens” column to show we’ve got to ten, and a zero in the “units” column – giving 10, then 11 and so on. The decimal system is known as “base 10”; the binary system is “base 2”, so we run out of digits as soon as we get to 1. The next column is the “twos” column, then the “fours” column and so on. So binary numbers look like this:

For example, 5 in binary is 101 – a four, no twos and a one. Although it makes life simple electronically to have just two digits to work with, the downside is that binary numbers get long very quickly. Usually they are stored in multiples of eight: 8 “bit” (binary digit) numbers have a maximum value of 255. Incidentally, this is enough to encode all common letter and symbols as binary numbers, hence a “byte” (an eight bit number) is the standard unit of memory size in a computer. This table shows the standard ASCII character set – only seven bits are actually used, allowing room for expansion. Incidentally, the first bit of a number is often used to show positive or negative, so an 8 bit number can either represent 0 to 255, or -127 to + 127.

**Octal and hexadecimal: **Because multiples of 8 bits are universally used, it is often convenient to use base 8 (octal) or base 16 (hexadecimal) numbers to save space. The number 92 in octal is 134 (the column headings being 64, 8, 1) and in hexadecimal is 5C. The C represents 12 (A = 10, B = 11 and so on), thus 5C is five 16’s and twelve 1’s.

**The human counter: **One noteworthy feature of the binary table is that every time you move from one row to the next one down, any column changing from a 1 to a 0 forces the next column to the left to change its state. For example, moving from 3 to 4, the 1’s column changes from 1 to 0 forcing the 2’s column to change its state; this is also a 1 to a 0, so this forces the 4’s column to change its state from a 0 to 1. You can thus form a human analogue of a computer counter by lining 4 people up, side-to-side, an arm’s length away from each other. Right arm in the air represents 1, by the side represents 0. All start with hands by their side. A fifth person to the left of the line represents the computer clock, and regularly taps the 1’s person on the shoulder – this is the signal to change state. Every time someone’s arm comes down, tap the shoulder of the person to the right, who then changes state. As the arms go up and down, the human counter will count through from 0 to 15!

There’s a sort of representation of this on YouTube, but I would love to see a proper human demonstration posted there.

## Leave a Reply