← All code tables / Numbers & science

Binary-Coded Decimal (BCD)

BCD 8421 reference table: each decimal digit 0–9 is encoded separately with exactly four binary bits.

Decimal digit8421 BCD nibbleBit weights
000008 4 2 1
100018 4 2 1
200108 4 2 1
300118 4 2 1
401008 4 2 1
501018 4 2 1
601108 4 2 1
701118 4 2 1
810008 4 2 1
910018 4 2 1
BCD is not the same as converting a whole number to binary. For example, decimal 42 is BCD 0100 0010, but ordinary binary 101010.
Geocaching tip: If binary is separated into four-bit groups and every nibble has a value from 0 to 9, try BCD.