COMPUTEREVOLUTION

~ / bit-flipper

bits.exe

The Bit Flipper

Early computers like the Altair 8800 and the PDP-8 were programmed by flipping switches on a front panel. Each switch is one bit, worth a power of two. Flip them, and watch the byte change.

DECIMAL0
HEX0x00
BINARY00000000
ASCII—

How binary works

Each switch is worth double the one to its right: 1, 2, 4, 8, 16, 32, 64 and 128. Add up the values of the switches that are on and you get the number. With eight switches, called a byte, you can make any number from 0 to 255.

Computers store letters as numbers too. In ASCII, the standard code from the 1960s, capital A is 65 (01000001), B is 66, and a lowercase a is 97. Type a letter in the box to see its code.

Why ones and zeros?

Electronic switches, from vacuum tubes to transistors, are easiest to build reliably with just two states: on or off. Leibniz described binary arithmetic in 1703, long before anyone could build a binary machine. Read the history in Before Electricity.

▲