Binary: counting with two digits · Pulse Beat
Computers store everything as bits, each a 0 or a 1. Binary counting works like decimal, but each place is worth twice the one to its right instead of ten times: 1, 2, 4, 8, 16...
Computers store everything as bits, each a 0 or a 1. Binary counting works like decimal, but each place is worth twice the one to its right instead of ten times: 1, 2, 4, 8, 16...
So 1011 in binary is 8 + 0 + 2 + 1 = 11. And 11 in decimal is 1011: 8 fits once, 4 doesn't fit, 2 fits, 1 fits.
Eight bits make a byte and can hold 2⁸ = 256 different values, 0 to 255. Letters, colours and sounds are all numbers agreed by convention. The letter A is 65 in the common ASCII code. A screen colour is three bytes: how much red, green and blue.
Why two digits? A circuit that is on or off is easy to build reliably, and billions of them can be combined to do arithmetic and logic.