Data Representation & Number Systems

a bit

A bit is the smallest possible piece of information: a single yes-or-no, true-or-false, 0-or-1. Think of one coin lying on a table — it is either heads or tails, and that one fact is exactly one bit. The word is a squashed-together form of 'binary digit'. Everything larger that a computer stores is just many bits side by side, the way a sentence is just many letters in a row.

Physically a bit is one tiny switch inside a chip holding either a low voltage (read as 0) or a high voltage (read as 1). One bit on its own can distinguish only two things, but bits multiply fast: with n bits you can make 2^n different patterns, because each extra bit doubles the possibilities. Two bits give 4 patterns (00, 01, 10, 11), three bits give 8, eight bits give 256. This doubling is why adding just a few bits hugely expands how many distinct values you can represent.

It helps to keep two confusions straight. First, a bit (lowercase b, the unit of information) is not a byte (8 bits); network speeds are usually quoted in bits per second while file sizes are in bytes, so an '8 megabit' link transfers about 1 megabyte per second, not 8. Second, the same word 'bit' is also borrowed in information theory to mean a unit of how much you learn from an answer, but for our purposes a bit is simply one binary 0-or-1 slot.

One bit answers one yes/no question — say, is the light on? Eight bits side by side form a byte and can name 2^8 = 256 distinct values, from 0b00000000 to 0b11111111.

A single bit is one binary choice; bits combine, with n bits giving 2^n patterns.

Bit (b) and byte (B) are different units off by a factor of eight. Internet plans advertise bits per second (Mbps) but downloads are measured in bytes (MB), which is a frequent source of 'why is it eight times slower than I expected' surprise.

Also called
binary digit二進位數字