Lab 7.
Codes by
design.
Design three code converters from their tables: BCD to excess-3, BCD to the 2421 weighted code, and the 9's complement of a BCD digit. Simplify each one with don't cares, then prove it on a 3D digital logic trainer.
Read the concepts first →Your details
Free to use, no sign up. Your name is only printed on your own lab sheet, and your work is saved in this browser so you can continue later. Nothing is sent to a server.
Excess-3, 2421 and 9's Complement Code Converters
This virtual lab builds code converters on a 3D digital logic trainer with a real breadboard. You design a BCD to excess-3 converter and a BCD to 2421 converter from their truth tables and Karnaugh maps, wire the gates and read the converted code on the LEDs.
Excess-3 and 2421 are self complementing codes: inverting every bit gives the nine's complement of the digit. That property made them useful for decimal subtraction in early calculators, and the lab shows it directly on the board. Every converter is checked for all ten digits, so a wrong Karnaugh map group shows up as a wrong row at once.

What you do on this bench
- Write the truth table of BCD to excess-3, with the six unused codes as don't cares.
- Simplify each output with a Karnaugh map and wire the converter.
- Check all ten digits on the LEDs.
- Design and wire the BCD to 2421 converter.
- Invert the output bits and compare them with the nine's complement of each digit.
On the bench
- Digital logic trainer with 16 toggle switches, 16 LEDs, pulse switches, a clock and a two digit seven segment display
- Full size breadboard with power rails and jumper wires that are wired pin by pin
- Cabinet of TTL chips with real pinouts (7400 series)
- Logic probe, multimeter and a binder of chip data sheets
Free, runs in the browser, no sign up and nothing to install. A computer with a graphics card gives the smoothest 3D view.
Questions students ask
What is excess-3 code?
Each decimal digit is written as its binary value plus three, so 0 is 0011 and 9 is 1100.
What does self complementing mean?
Inverting every bit of a digit's code gives the code of its nine's complement. In excess-3, 2 is 0101 and inverting it gives 1010, which is 7.
Why are the unused codes don't cares?
BCD only uses the codes for 0 to 9. The six codes from 1010 to 1111 never appear at the input, so their outputs can be chosen freely to make the Karnaugh map groups larger.
Read the concepts page for this lab · All Digital Logic Design virtual labs · All articles