EAZYLife STEM LAB · MODULE 24

Combinational Logic Design

Turn individual logic gates into useful digital circuits. Translate requirements into truth tables, write Boolean expressions, simplify logic and build a practical half-adder.

Free open lessonDigital electronicsPractical half-adder
REQUIREMENT · LOGIC · CIRCUIT
01 · FROM GATES TO SYSTEMS

Design the behaviour before drawing the circuit

A combinational logic circuit produces outputs determined by its present inputs. It has no intentional memory of previous input states. Examples include arithmetic circuits, code converters, selection circuits and simple decision logic.

A design workflow

RequirementTruth tableBoolean expressionGate circuit + testVerify every case

A disciplined workflow makes the behaviour testable before hardware is wired.

Combinational or sequential?

  • Combinational: output depends on current inputs only. Example: an AND gate or adder.
  • Sequential: output can depend on current inputs and stored state. Example: a counter or flip-flop circuit.
  • Propagation delay still exists: outputs do not change instantaneously after inputs change.
  • Glitches can occur briefly while signals travel through paths with different delays.

Design habit: write down what the circuit must do in plain language. Identify every input and output, list all input combinations, then derive the logic.

02 · BOOLEAN ALGEBRA

Describe logic with symbols and rules

Boolean algebra works with binary variables. A variable can be 0 or 1. The common operators are AND, OR and NOT. In expressions, a bar or prime mark means inversion.

Core identities

Identity: A · 1 = A; A + 0 = A

Null: A · 0 = 0; A + 1 = 1

Idempotent: A · A = A; A + A = A

Complement: A · A' = 0; A + A' = 1

Double inversion: (A')' = A

Distributive: A(B + C) = AB + AC

De Morgan's theorems

(A · B)' = A' + B'(A + B)' = A' · B'Invert the AND, OR the inverted inputsInvert the OR, AND the inverted inputs

De Morgan's theorems are useful when translating a design into NAND-only or NOR-only hardware.

03 · SIMPLIFY THE LOGIC

Reduce gates without changing behaviour

Equivalent Boolean expressions produce the same output for every possible input combination. Simplification can reduce IC count, wiring, power consumption and opportunities for mistakes.

Example: two conditions, same result

Suppose an output should be HIGH whenever A is HIGH, or whenever both B and C are HIGH.

Y = A + (B · C)

This expression is already compact. The circuit uses one AND gate feeding one OR gate.

BCAYANDOR

Two-variable Karnaugh map

A Karnaugh map groups adjacent 1s to identify a simpler expression. For two variables, arrange the four combinations in a 2 × 2 grid.

B=0B=1
A=0m0m1
A=1m2m3

Adjacent cells differ in one variable. Larger valid groups usually produce simpler terms. Module 24 uses small examples; larger maps need careful grouping and don't-care handling.

04 · UNIVERSAL GATES

Build any Boolean function from NAND or NOR

NAND and NOR are called universal gates because either gate type alone can be combined to implement NOT, AND, OR and more complex Boolean functions.

NAND constructions

NANDNANDNANDAABA'B'A'A · BA + B

Tie both inputs of a NAND together to make an inverter. Then use De Morgan's theorem to create other functions.

NOR constructions

  • NOT: connect A to both inputs of a NOR gate.
  • OR: invert the output of a NOR gate using another NOR gate as an inverter.
  • AND: invert A and B separately, then NOR the inverted signals.
  • Real designs must account for gate count, propagation delay, fan-out and available IC packages.

Universal-gate design is useful when a particular logic family or IC stock is limited. It is not always the fastest or smallest implementation.

05 · COMMON COMBINATIONAL BUILDING BLOCKS

Useful circuits you will meet in real designs

Multiplexer (MUX)

D0D1YSMUX

Selects one of several data inputs and routes it to a single output. A 2:1 MUX implements Y = S'D0 + SD1.

Decoder

AB2-to-4Y0Y1Y2Y3

Converts a binary input code into one of several active outputs. Useful for address selection and display control.

Encoder

I0I1I2I34-to-2B1B0

Converts an active input line into a binary code. Practical priority encoders resolve cases where more than one input is active.

Half adder

ABSUMCARRYHALFADDER

Adds two one-bit inputs. SUM = A XOR B; CARRY = A AND B. A full adder also accepts a carry-in.

06 · INTERACTIVE DESIGN BENCH

Choose a function and inspect its truth table

Change A and B to see how different Boolean functions behave. The table is generated from the selected function. This is a logic teaching model, not a transistor-level IC simulator.

INPUT A / SELECT
INPUT B / DATA
OUTPUT Y0 · LOW

AND is HIGH only when both inputs are HIGH.

Truth table

ABY
000
010
100
111

The highlighted row matches the current input states.

07 · PRACTICAL BUILD

Build a one-bit half adder

A half adder adds two single binary digits. It produces a SUM bit and a CARRY bit. We will build it from one 74HC86 XOR gate and one 74HC08 AND gate, then test all four input combinations.

What the circuit does

ABSUMCARRY
0000
0110
1010
1101

SUM = A ⊕ B · CARRY = A · B

When both inputs are 1, binary 1 + 1 produces 10: SUM is 0 and CARRY is 1.

Half-adder logic schematic

ABABXORANDSUMCARRY

The same two input signals feed both gates. The XOR path generates SUM; the AND path generates CARRY.

Components and equipment

  • One 74HC86 quad XOR IC and one 74HC08 quad AND IC, in DIP packages.
  • Two normally-open pushbuttons and two 10 kΩ pull-down resistors.
  • Two LEDs and two 1 kΩ current-limiting resistors.
  • Two 100 nF ceramic bypass capacitors, one per IC.
  • Regulated 5 V current-limited extra-low-voltage supply, breadboard, jumper wires and multimeter.

74HC86 and 74HC08 pin connections

74HC8674HC08XORAND1 A2 B3 SUM14 VCC7 GND1 A2 B3 CARRY14 VCC7 GNDConceptual pin map: confirm exact manufacturer datasheets before wiring

Both ICs use the first gate. Their pin 1 and pin 2 inputs receive the same A and B signals. Pin 3 gives the respective output. Both packages are powered separately.

Wiring guide

  1. With supply disconnected, place both ICs across the breadboard centre gap. Identify pin 1 from the notch or dot.
  2. Connect pin 14 of each IC to regulated +5 V and pin 7 of each IC to GND.
  3. Place one 100 nF capacitor close between pins 14 and 7 of each IC.
  4. Make input A: connect a normally-open pushbutton from +5 V to a shared A node. Connect 10 kΩ from A to GND. Connect A to pin 1 of both ICs.
  5. Make input B in the same way, using the second button and 10 kΩ pull-down. Connect B to pin 2 of both ICs.
  6. Connect 74HC86 pin 3 through a 1 kΩ resistor to the SUM LED anode; connect LED cathode to GND.
  7. Connect 74HC08 pin 3 through a 1 kΩ resistor to the CARRY LED anode; connect LED cathode to GND.
  8. Check polarity, supply wiring and for shorts before powering. Use a current-limited supply.

Expected behaviour: no buttons pressed gives SUM off and CARRY off. Press either button alone and SUM lights. Press both together and SUM turns off while CARRY lights. Record all four combinations and compare them with the truth table.

Do not leave CMOS inputs floating. Keep the supply within the exact 74HC device ratings, use local bypass capacitors and disconnect power before changing wiring. The IC outputs drive only the small indicator loads in this experiment; do not connect motors, relays or large loads directly.

08 · TESTING AND TROUBLESHOOTING

Verify the circuit, don't just admire the LEDs

Test procedure

  1. Test each button and verify its input node changes between LOW and HIGH.
  2. Measure the A and B logic voltages relative to the circuit ground.
  3. Test 00, 01, 10 and 11 in order.
  4. Record SUM and CARRY for each row.
  5. Compare the measured result with the half-adder truth table.
  6. If possible, use an oscilloscope to observe propagation delay and switch bounce.

Common faults

  • Both LEDs always off: check power, common ground, IC orientation and input wiring.
  • SUM works but CARRY does not: check 74HC08 pin 1, 2 and 3 and the carry LED polarity.
  • LED always on: check whether the input is floating, pull-down placement or an accidental +5 V connection.
  • Unstable output: add/relocate bypass capacitors, shorten wiring and verify solid breadboard contacts.
  • Wrong truth table: check that A and B each reach both ICs and that output pins are not confused with adjacent pins.

Challenge: add a third input and design a circuit that turns on an indicator when at least two of the three inputs are HIGH. Start with a truth table, derive the Boolean expression, simplify it and test every input combination.

KNOWLEDGE CHECK

Check your design understanding

1. What determines the output of a combinational circuit?

2. Which gates are universal?

3. What does a 2:1 multiplexer do?

4. In a half adder, what produces the carry output?

KEEP LEARNING · GO FURTHER

Free to learn. More support when you need it.

Explore these open lessons at your own pace. For personalised explanations, project-specific troubleshooting, guided practical training or masterclasses, EazyLife offers paid support tailored to your learning goals.

Free or sponsored lesson referrals may be available through active programmes; they are not guaranteed.

Enquire about guidance