CircuitNote

Quick electronics calculators for lab work and circuit design. Free, no sign-up, works in your browser.

A half adder and a full adder from one 74153 multiplexer

How to pick the multiplexer data inputs from a truth table, with measured results.

A 4:1 multiplexer uses two select inputs to pass one of four data inputs to its output. Put A and B on the select inputs and you can choose what the output should be for each of the four A, B combinations, so a single multiplexer can make any function of two variables. The 74153 contains two 4:1 multiplexers, enough for both the sum (S) and the carry (C) in one chip.

In this guide 4

1. Choosing the data inputs

Split the truth table into the four select combinations (B, A). For each one, see how the output depends on the remaining variable (Cin for a full adder). Always 0 means GND, always 1 means VCC, the same as Cin means Cin, and the opposite means Cin (one NOT gate).

Data inputSelect B AHalf adder S (1Y)Half adder C (2Y)Full adder S (1Y)Full adder Cout (2Y)
Data inputC0 (pins 6, 10)Select B A00Half adder S (1Y)0Half adder C (2Y)0Full adder S (1Y)CinFull adder Cout (2Y)0
Data inputC1 (pins 5, 11)Select B A01Half adder S (1Y)1Half adder C (2Y)0Full adder S (1Y)CinFull adder Cout (2Y)Cin
Data inputC2 (pins 4, 12)Select B A10Half adder S (1Y)1Half adder C (2Y)0Full adder S (1Y)CinFull adder Cout (2Y)Cin
Data inputC3 (pins 3, 13)Select B A11Half adder S (1Y)0Half adder C (2Y)1Full adder S (1Y)CinFull adder Cout (2Y)1

The values are derived from the truth tables in code. B is the upper select bit and A the lower. On the 74153, A is pin 14, B pin 2, 1Y pin 7, 2Y pin 9, VCC pin 16 and GND pin 8.

2. Easy to miss: the strobe (G) pins

1G̅ (pin 1) and 2G̅ (pin 15) on the 74153 are active-low strobes. They must go to GND; if they are High or floating the output stays 0 whatever the inputs. If everything is wired and the output never leaves 0, check these first.

3. Measurements

CinABS measuredCout measuredTheory
Cin0A0B0S measured0Cout measured0Theory✓
Cin0A0B1S measured1Cout measured0Theory✓
Cin0A1B0S measured1Cout measured0Theory✓
Cin0A1B1S measured0Cout measured1Theory✓
Cin1A0B0S measured1Cout measured0Theory✓
Cin1A0B1S measured0Cout measured1Theory✓
Cin1A1B0S measured0Cout measured1Theory✓
Cin1A1B1S measured1Cout measured1Theory✓

All eight full-adder combinations matched the theory. A half adder on the same chip matched in all four cases (C = 1 only when A and B are both 1, S = 1 when they differ). Built from gates, a full adder needs several XOR, AND and OR chips; with a multiplexer it is one 74153 and one NOT gate, with far less wiring.

Try it: add with a 74153

A and B drive the select lines and C0 to C3 carry the values from the table above (0, 1, Cin, Cin). 'LEDs measured' compares with the lab record.

Inputs

Select B A
00
S (1Y)
0
C (2Y)
0
LEDs measured
0 / 0 ✓

Things to try: changing B A makes both muxes pass the same-numbered input at once. On the full adder, flipping Cin only changes an output when the selected input is Cin or Cin.

4. Going to more bits

Feed each full adder's Cout into the next stage's Cin to build a multi-bit adder. Check 4-bit results in advance with the add mode (s1 s0 = 0 1) of the 4-bit ALU calculator, binary values with the number base converter, and signed results of subtraction with the two's complement calculator.