Binary coded decimal, or BCD, stores each decimal digit in its own four-bit group instead of converting the whole number to binary. So the decimal 25 in BCD is 0010 0101, one group for the 2 and one for the 5, not the pure binary 11001. This guide explains how BCD works, how to convert decimal to BCD and back, and why hardware still uses it, with free converters for each step.
In this guide
What BCD is
BCD encodes numbers one decimal digit at a time. Each digit from 0 to 9 gets a four-bit code from 0000 to 1001, and the codes 1010 through 1111 go unused. This keeps the decimal structure visible inside the binary, which is the whole point: a device can read or display each digit without doing a full base conversion. For the wider context of how this differs from standard binary, our number systems guide is a good companion.
Convert decimal to BCD
To convert decimal to BCD, take each digit on its own and write its four-bit code. The decimal 397 becomes 0011 1001 0111: 3 is 0011, 9 is 1001, and 7 is 0111. You never add the digits together or carry between them, which is what separates BCD from a true binary conversion. The decimal to BCD converter does the grouping for any number instantly.
Convert BCD back to decimal
Going back, you split the bit string into four-bit groups from the right and read each group as a single decimal digit. The BCD 0001 0110 is 16, because 0001 is 1 and 0110 is 6. If a group lands on an unused code from 1010 to 1111, the data is not valid BCD. The BCD to decimal converter handles the split and flags bad groups, and you can also move BCD straight to hex with the BCD to hex converter.
BCD vs pure binary
Pure binary is more compact. The number 99 fits in 7 bits as binary, but BCD needs 8 bits because it spends four on each digit. The trade is space for convenience: BCD wastes some bits but keeps decimal digits easy to read, round, and display without conversion errors. That is why a calculator or a digital clock often works in BCD, while a general-purpose CPU works in pure binary.
Why BCD still matters
BCD shows up wherever exact decimal display or arithmetic matters more than tight storage. Digital clocks, calculators, electronic meters, and seven-segment displays commonly drive each digit from a BCD value. Financial and measurement systems sometimes use it to avoid the tiny rounding differences that creep in when decimal fractions are forced into binary. It is a niche encoding now, but a stubbornly useful one.
Free converters used in this guide
Frequently asked questions
What is BCD?
Binary coded decimal stores each decimal digit in its own four-bit group, so the value 25 becomes 0010 0101 instead of the pure binary 11001.
How do I convert decimal to BCD?
Write the four-bit code for each decimal digit separately and join them. The number 397 becomes 0011 1001 0111.
How is BCD different from binary?
Binary converts the whole number into base 2, while BCD encodes each decimal digit on its own, so BCD uses more bits but keeps the decimal digits readable.
Which four-bit codes are invalid in BCD?
The codes 1010 through 1111 are unused, because BCD only needs the ten patterns 0000 to 1001 for the digits 0 to 9.
Where is BCD used?
In digital clocks, calculators, electronic meters, and seven-segment displays, where each decimal digit needs to be read or shown without a full base conversion.