74HC decoder, mux and adder drawer
12 chips on breadboards, powered, every input tied low and ready to rewire. There is no microcontroller in it: the simulator solves the 12 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Beginner About 20 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $23. On Mokxi they're free.
What you'll learn
- How a decoder turns a binary number into one active line
- How a multiplexer picks one of several inputs
- How a priority encoder finds the highest active input
- Adding binary numbers with a 4-bit adder
- Comparing two 4-bit numbers
- Difficulty: Beginner
- Time: About 20 minutes
- Parts: 18
How it works
This is a drawer of 12 chips on three breadboards: priority encoders, multiplexers, decoders, a comparator, two adders and a 7-segment decoder. Each has 5 V on its power pin and ground on its GND pin.
Every input is wired to ground, so nothing floats. Nothing else is connected, and no code runs, because there is no microcontroller.
You pick a chip and move an input's wire to the plus rail. Then you put an LED and a resistor on an output and see the result. Each chip's help page has its pins and truth table.
Parts list
18 parts, plus the jumper wires. They retail for about $23; on Mokxi they're free.
- 3 × Full-size breadboard
- 3 × Power, 5 V
- 1 × 74HC147 priority encoder
- 1 × 74HC148 priority encoder
- 1 × 74HC151 8-input multiplexer
- 1 × 74HC153 dual 4-input multiplexer
- 1 × 74HC157 quad 2-input multiplexer
- 1 × 74HC139 dual 2-to-4 decoder
- 1 × 74HC154 4-to-16 decoder
- 1 × 74HC42 BCD to decimal decoder
- 1 × 74HC85 4-bit magnitude comparator
- 1 × 74HC283 4-bit adder
- 1 × 74LS83 4-bit adder
- 1 × 74LS47 7-segment decoder
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| 74HC147 priority encoder pin VCC | 5 V |
| 74HC148 priority encoder pin VCC | 5 V |
| 74HC151 8-input multiplexer pin VCC | 5 V |
| 74HC153 dual 4-input multiplexer pin VCC | 5 V |
| 74HC157 quad 2-input multiplexer pin VCC | 5 V |
| 74HC147 priority encoder pin I4 | Ground |
| 74HC147 priority encoder pin I5 | Ground |
| 74HC147 priority encoder pin I6 | Ground |
| 74HC147 priority encoder pin I7 | Ground |
| 74HC147 priority encoder pin I8 | Ground |
| 74HC147 priority encoder pin GND | Ground |
| 74HC147 priority encoder pin I9 | Ground |
| 74HC147 priority encoder pin I1 | Ground |
| 74HC147 priority encoder pin I2 | Ground |
| 74HC147 priority encoder pin I3 | Ground |
| 74HC148 priority encoder pin I4 | Ground |
| 74HC148 priority encoder pin I5 | Ground |
| 74HC148 priority encoder pin I6 | Ground |
| 74HC148 priority encoder pin I7 | Ground |
| 74HC148 priority encoder pin EI | Ground |
| 74HC148 priority encoder pin GND | Ground |
| 74HC148 priority encoder pin I0 | Ground |
| 74HC148 priority encoder pin I1 | Ground |
| 74HC148 priority encoder pin I2 | Ground |
| 74HC148 priority encoder pin I3 | Ground |
| 74HC151 8-input multiplexer pin D3 | Ground |
| 74HC151 8-input multiplexer pin D2 | Ground |
| 74HC151 8-input multiplexer pin D1 | Ground |
| 74HC151 8-input multiplexer pin D0 | Ground |
| 74HC151 8-input multiplexer pin G | Ground |
| 74HC151 8-input multiplexer pin GND | Ground |
| 74HC151 8-input multiplexer pin C | Ground |
| 74HC151 8-input multiplexer pin B | Ground |
| 74HC151 8-input multiplexer pin A | Ground |
| 74HC151 8-input multiplexer pin D7 | Ground |
| 74HC151 8-input multiplexer pin D6 | Ground |
| 74HC151 8-input multiplexer pin D5 | Ground |
| 74HC151 8-input multiplexer pin D4 | Ground |
| 74HC153 dual 4-input multiplexer pin 1G | Ground |
| 74HC153 dual 4-input multiplexer pin B | Ground |
| 74HC153 dual 4-input multiplexer pin 1C3 | Ground |
| 74HC153 dual 4-input multiplexer pin 1C2 | Ground |
| 74HC153 dual 4-input multiplexer pin 1C1 | Ground |
| 74HC153 dual 4-input multiplexer pin 1C0 | Ground |
| 74HC153 dual 4-input multiplexer pin GND | Ground |
| 74HC153 dual 4-input multiplexer pin 2C0 | Ground |
| 74HC153 dual 4-input multiplexer pin 2C1 | Ground |
| 74HC153 dual 4-input multiplexer pin 2C2 | Ground |
| 74HC153 dual 4-input multiplexer pin 2C3 | Ground |
| 74HC153 dual 4-input multiplexer pin A | Ground |
| 74HC153 dual 4-input multiplexer pin 2G | Ground |
| 74HC157 quad 2-input multiplexer pin S | Ground |
| 74HC157 quad 2-input multiplexer pin 1I0 | Ground |
| 74HC157 quad 2-input multiplexer pin 1I1 | Ground |
| 74HC157 quad 2-input multiplexer pin 2I0 | Ground |
| 74HC157 quad 2-input multiplexer pin 2I1 | Ground |
| 74HC157 quad 2-input multiplexer pin GND | Ground |
| 74HC157 quad 2-input multiplexer pin 3I1 | Ground |
| 74HC157 quad 2-input multiplexer pin 3I0 | Ground |
| 74HC157 quad 2-input multiplexer pin 4I1 | Ground |
67 more connections: open it in the simulator to see them all.
The notes that come with it
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// 74HC decoder, mux and adder drawer.
//
// Every chip is on a breadboard and powered, and every one of its inputs is
// tied low by a wire to a ground rail, so nothing floats. Nothing else is
// wired: pick a chip, move an input's wire to the + rail, put an LED with a
// resistor on an output, and see what it does. Each chip's help page has its
// pins and its truth table.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- A decoder output looks inverted. This project
Many of these chips have active-low outputs. Read the help page: the selected output goes low, and the others stay high. - A chip does nothing when you change its address inputs. This project
Look for an enable pin such as G, E or EI. All of them start tied to ground, so check the help page for whether that enables or disables the chip. - The output looks upside down. 74HC147 priority encoder
The inputs and the outputs are active LOW. A LOW on an input means that digit is pressed, and the BCD outputs come out inverted. Invert the outputs to get the plain number. - Some buttons read as no input at all. 74HC147 priority encoder
Unpressed inputs must be pulled HIGH, using 10 k pull-up resistors. There is no input for zero: all inputs HIGH means zero. Power pin 16 and ground pin 8, with a 0.1 uF cap. - The outputs look backward or inverted. 74HC148 priority encoder
Inputs and outputs are active low. A low on the highest numbered input shows its number as an inverted binary code. Invert the code in hardware or software. - Outputs do not respond. 74HC148 priority encoder
Pull the enable input EI low to enable the chip. Unused inputs must be pulled high, not left floating. Add a 100 nF cap close to VCC. - The wrong input is selected. 74HC151 8-input multiplexer
The select pins A, B and C form a 3-bit binary number, with C as the most significant bit. Check which wire is which on the datasheet. - The output stays off. 74HC151 8-input multiplexer
The strobe (enable) pin is active low. Tie it to ground for the chip to work. Also supply VCC and ground, with a 0.1 uF capacitor.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.