SinBench
← All labs · Digital Logic Design · Free virtual lab

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 →
Excess-3BCD + 3, self complementing
2421a weighted code
9's complement9 - d for subtraction
Before you start

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.

01
Read the concepts page and use its K-map with don't cares.
02
You choose the gates and do the wiring. The bench checks the outputs for all ten digits.
03
Each table records the four outputs and carries them onto your lab sheet.
Designed by
© 2026 Fasih Ullah Saleem. All rights reserved. · About · Terms of Use · Privacy
About this virtual lab

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.

Excess-3, 2421 and 9's Complement Code Converters: the working 3D lab bench with its trainer and instruments
The bench of this lab, as it looks after you enter it.

What you do on this bench

  1. Write the truth table of BCD to excess-3, with the six unused codes as don't cares.
  2. Simplify each output with a Karnaugh map and wire the converter.
  3. Check all ten digits on the LEDs.
  4. Design and wire the BCD to 2421 converter.
  5. 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.