BCD to decimal converter

Paste BCD bits from a circuit or datasheet to read the decimal digits they stand for.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter bcd bits and code.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Split the bits into groups of 4 from the left and turn each group into its digit: the binary value in 8421, the value minus 3 in Excess-3, and the code table in 2421.

Example

Inputs: BCD bits = 0010 0000 0010 0110, Code = Standard 8421 BCD. Result: Decimal digits: 2026; Digit count: 4.

0010 0000 0010 0110
2026

Limits and caveats

  • Reads four bits per digit and does not interpret sign nibbles.
  • The bit count must be a multiple of 4.

Questions about this tool

Why is 1010 reported as invalid?

In standard BCD the top code word is 1001 for 9. Patterns 1010 to 1111 stand for no digit.

Why is the result 07 and not 7?

Each group is one digit position, so positions are shown as they are. The numeric value 7 appears on the next line.

How do I know which code is used?

Check the chip datasheet. If 0000 appears it is likely 8421 or 2421, since Excess-3 starts at 0011.