If you have ever stared at a binary clock and wondered why it shows the time as several small groups of lights rather than one long stream of ones and zeros, the answer is a neat little encoding called binary-coded decimal, almost always shortened to BCD. BCD is the bridge between the decimal numbers humans read and the binary signals machines prefer, and it is the reason a binary clock stays surprisingly easy to decode.
This article explains what BCD is, how it packs a single decimal digit into four bits, why the weights 8, 4, 2, and 1 keep appearing, and where you meet BCD in the real world beyond clocks. Keep the live binary clock handy as you read, because every idea here maps directly onto the columns of lights you see there.
The Core Idea of BCD
Decimal, the number system we use every day, has ten digits: 0 through 9. Binary, the language of digital electronics, has only two: 0 and 1. BCD is a compromise that keeps the human-friendly decimal digits but writes each one using binary. Rather than converting a whole number like 47 into one binary value, BCD handles the 4 and the 7 separately, encoding each digit in its own little four-bit group.
Four bits are used because four bits can represent sixteen different patterns, which is more than enough to cover the ten digits 0 through 9. The remaining six patterns simply go unused in standard BCD. This is slightly wasteful compared with pure binary, but it buys something valuable: a direct, digit-by-digit correspondence that makes displays trivial to build and easy for people to read.
The 8-4-2-1 Weights
Each of the four bits in a BCD digit carries a fixed weight. From the most significant bit to the least, those weights are 8, 4, 2, and 1, the powers of two. To find the decimal value of a four-bit group, you add the weights of the bits that are set to 1.
- Bit worth 8: the highest bit in the group
- Bit worth 4: the next bit down
- Bit worth 2: the next bit down
- Bit worth 1: the lowest bit
Because standard BCD uses exactly these weights, it is sometimes called 8421 BCD. Those same weights are what each lamp represents in a column of a binary clock, which is why understanding BCD and learning to read the clock are really the same lesson. Our guide on how to read a binary clock puts these weights to work on live lights.
Encoding a Digit in BCD
Turning a decimal digit into BCD is just a matter of finding which weights add up to it. Consider the digit 9:
- Ask if 8 fits. Yes, 9 is at least 8, so set the 8 bit and subtract, leaving 1.
- Ask if 4 fits. No, 1 is less than 4, so leave the 4 bit at 0.
- Ask if 2 fits. No, 1 is less than 2, so leave the 2 bit at 0.
- Ask if 1 fits. Yes, so set the 1 bit, leaving nothing.
The result is the pattern 1001, which is exactly how a binary clock lights up the digit 9: top lamp on, two middle lamps off, bottom lamp on. Work the same steps for 5 and you get 0101 (4 + 1), and for 3 you get 0011 (2 + 1). Each digit is independent, so a two-digit number is just two of these groups side by side.
Encoding a Full Number
To encode the number 42 in BCD, handle each digit separately. The 4 becomes 0100 and the 2 becomes 0010, giving 0100 0010. Notice that this is not the same as the pure binary value of 42, which is 101010. That difference is the heart of the distinction between a BCD clock and a true binary clock, a topic we explore in binary clock vs BCD clock.
Why Clocks Use BCD Instead of Pure Binary
A designer building a clock could store the time as a single binary number, but BCD wins for displays because it lines up so cleanly with the digits people expect. Each digit gets its own column, so nothing needs to be recalculated when a single digit rolls over. When the seconds tick from 29 to 30, only the two relevant columns change, exactly as they would on a familiar readout.
- Readability: a human can decode one four-lamp column at a time instead of one long value.
- Simple hardware: each digit maps to its own counter that resets at 9, matching how decimal counting works.
- Clean rollovers: minutes and seconds naturally cap at 59, so the tens digit never exceeds 5, letting designers trim unused lamps.
- Easy comparison: the layout mirrors a standard clock, so you can check it against a digital clock at a glance.
BCD Beyond the Clock Face
BCD is far older and more widespread than the novelty clock on your desk. It appears anywhere machines need to move between human decimal numbers and digital circuits without fuss.
Calculators and Early Computers
Many pocket calculators use BCD internally so that decimal fractions like 0.1 behave predictably, avoiding the tiny rounding quirks that pure binary floating point can introduce. Several early computers and financial systems leaned on BCD for exactly this reason, since money must be counted in exact decimal cents.
Displays and Instruments
Seven-segment displays, the glowing numerals on microwaves, meters, and dashboards, are frequently driven by BCD. A small chip called a BCD-to-seven-segment decoder takes a four-bit digit and lights the correct segments, keeping the wiring simple. The binary clock is really just a stripped-down version of the same idea, showing the raw four bits instead of translating them into a shaped numeral.
Packed and Unpacked BCD
Engineers use two flavours of BCD depending on how tightly they need to store the digits. Unpacked BCD gives each decimal digit a full byte and leaves the upper four bits empty, which wastes space but keeps the digits easy to manipulate one at a time. Packed BCD squeezes two digits into a single byte, one in the upper four bits and one in the lower four, doubling the storage efficiency. A binary clock does not care about either scheme, since it simply lights the four bits of each digit, but the distinction matters inside real hardware and helps explain why BCD survived so long in commercial and financial systems where exact decimal handling was non-negotiable.
The Trade-Offs of BCD
BCD is convenient, but it is not free. Because each digit uses four bits and wastes six of the sixteen possible patterns, BCD stores numbers less densely than pure binary. A byte can hold values up to 255 in pure binary but only two BCD digits, 00 through 99. For storage-hungry applications this inefficiency matters, which is why general-purpose computing overwhelmingly uses pure binary and reserves BCD for displays, arithmetic that must stay exactly decimal, and teaching tools like clocks. If you want to strengthen the underlying skill of moving between the two systems, our walkthrough on how to convert decimal to binary is the natural companion to this piece, and you can watch the concepts animate on the analog clock for a change of pace.
Conclusion
Binary-coded decimal is a simple, elegant compromise: keep the decimal digits people love, but write each one in four bits using the 8-4-2-1 weights. That single trick is what makes a binary clock legible, what drives the numerals on countless everyday devices, and what keeps decimal arithmetic exact where it must be. Now that you know what those four-lamp groups really mean, open the live binary clock and decode a digit for yourself, then browse the rest of the guides on the binclock.com homepage to go deeper.