BCD Representation Simulator
Store each denary digit as a 4-bit nibble, compare BCD with pure binary and add BCD numbers with the +6 correction.
Denary → BCD
Each denary digit is stored separately as a 4-bit binary number (a nibble).
00101001 01010000
About This Simulation
This BCD simulator shows how Binary Coded Decimal stores each denary digit as its own 4-bit nibble. Convert numbers to and from BCD, compare packed and unpacked storage with pure binary, and step through BCD addition with the add-6 correction.
Features
- Denary to BCD with each digit converted to a nibble
- BCD to denary, with invalid nibbles (1010–1111) flagged
- Packed and unpacked BCD storage
- Bit and byte comparison with pure binary
- BCD addition step by step with the +6 correction
Topics covered
- Binary Coded Decimal
- Nibbles
- Packed and Unpacked BCD
- BCD Addition
- Uses of BCD
Explanation
Binary Coded Decimal (BCD) represents a denary number by converting each digit separately into a 4-bit binary code. For example, 59 is stored as 0101 1001 rather than 111011 in pure binary. Only the codes 0000 to 1001 are used; 1010 to 1111 are invalid.
How it works
- Split the denary number into digits and write each one as 4 bits: 2950 → 0010 1001 0101 0000.
- To decode, split the bits into groups of 4 and convert each group to one digit.
- Packed BCD stores two digits in each byte; unpacked BCD stores one digit per byte.
- To add in BCD, add each nibble in binary. If a nibble's result is more than 9 (or a carry is produced), add 6 (0110) to correct it and carry 1 to the next digit.
Why it matters
BCD is on the IGCSE and AS Level syllabuses. It is used where denary digits must be displayed or must be exact, such as calculators, digital clocks, seven-segment displays and some financial systems, because there are no binary-to-denary rounding errors.
Frequently Asked Questions
What is the BCD representation of 47?
0100 0111: 4 is 0100 and 7 is 0111.
Why does BCD use more bits than binary?
Each 4-bit nibble can hold 16 values but BCD uses only 10 of them, so 6 codes in every nibble are wasted.
Why add 6 in BCD addition?
A nibble can count to 15 but a denary digit only to 9. Adding 6 skips the six unused codes so the nibble wraps round correctly and produces a carry.
Where is BCD used?
Calculators, digital clocks, electronic meters and seven-segment displays, and in financial calculations that need exact denary values.
Related Simulations
Number Systems
Number System Converter
Convert between binary, decimal, hex, octal
Data Representation
Unicode / ASCII Simulator
See how characters are stored as numbers in ASCII, UTF-8 and UTF-16, with an interactive ASCII table.
Number Systems
Two's Complement Simulator
Convert between denary and two's complement binary, with the invert-and-add-one steps and the negative place value shown.
Number Systems
Bitwise Operations Simulator
Apply AND, OR, XOR, NOT, logical and arithmetic shifts and rotations to 8-bit values, and use masks to set, clear and test bits.

