Source: https://mokxi.com/teachers/plans/sequential-logic-design
Updated: 2026-11-19

Lesson plan

# Sequential logic design lesson plan

Circuits with memory, from real 74HC chips: flip-flops, synchronous counters, shift registers, Moore and Mealy machines, state encoding and hazards. Ends with a traffic light timed and decoded in hardware.

7 chapters, 7 lessons, about 6 hours, no board. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- Edge triggering, set and reset, the forbidden state and the toggle.
- Synchronous counting, terminal count, a decade and eight bits.
- Load, shift, serial in and a ring counter.
- Outputs from the state alone, or from the state and the input.
- Binary, Gray and one-hot, and what each one buys.
- Bouncing clocks, glitches, ripple and metastability.
- A timer, a decoder and a latch, then your own timing.

### Materials for the whole unit

- 74HC00 quad NAND
- 74HC04 hex inverter
- 74HC08 quad AND
- 74HC14 Schmitt inverter
- 74HC161 4-bit counter x 2
- 74HC194 universal shift register
- 74HC74 dual flip-flop
- 74HC86 quad XOR
- Capacitor
- Clock
- LED x 7
- Pushbutton x 3
- Resistor x 7
- Slide switch x 3
- Traffic light module

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 55 min

## Flip-flop types

Edge triggering, set and reset, the forbidden state and the toggle.

Lesson | Time | What students do

Flip-flop types Half a 74HC74: a D flip-flop that samples on the clock edge and holds, asynchronous set and reset, the forbidden state, and the toggle flip-flop that is half of every counter. | 55 min

- Run it: D on the edge
- It holds
- Set without a clock
- The forbidden state
- Build a toggle
- Divide by two

### Materials

- 74HC04 hex inverter
- 74HC74 dual flip-flop
- LED x 2
- Pushbutton x 3
- Resistor x 5
- Slide switch

### Check for understanding

Each student finishes "Flip-flop types" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Divide by two".

Chapter 2. About 1 h 5 min

## Counters

Synchronous counting, terminal count, a decade and eight bits.

Lesson | Time | What students do

Counters The 74HC161 synchronous counter: binary on four outputs, terminal count, wrapping at 16, a decade counter from one NAND gate, and a second chip cascaded for eight bits. | 65 min

- Run it: count
- Terminal count
- It wraps
- A decade counter
- Zero to nine
- Cascade a second chip
- Eight bits

### Materials

- 74HC00 quad NAND
- 74HC161 4-bit counter x 2
- Clock
- LED x 5
- Resistor x 5

### Check for understanding

Each student finishes "Counters" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Eight bits".

Chapter 3. About 55 min

## Shift registers

Load, shift, serial in and a ring counter.

Lesson | Time | What students do

Shift registers The 74HC194 universal shift register: parallel load, shift right, serial data in, and a ring counter made by feeding the last stage back to the first. | 55 min

- Run it: parallel load
- Shift right
- Serial data in
- Close the ring
- Walk the 1
- Round again

### Materials

- 74HC194 universal shift register
- LED x 4
- Pushbutton
- Resistor x 5
- Slide switch x 3

### Check for understanding

Each student finishes "Shift registers" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Round again".

Chapter 4. About 45 min

## Moore and Mealy

Outputs from the state alone, or from the state and the input.

Lesson | Time | What students do

Moore and Mealy One button, two flip-flops, two outputs: a Moore machine that answers on the next clock and lasts one clock, and a Mealy machine that answers at once and depends on the input itself. | 45 min

- Run it: Mealy answers now
- Moore waits for the clock
- Mealy ends at the edge
- Moore lasts one clock
- A tap between clocks

### Materials

- 74HC04 hex inverter
- 74HC08 quad AND
- 74HC74 dual flip-flop
- Clock
- LED x 2
- Pushbutton
- Resistor x 3

### Check for understanding

Each student finishes "Moore and Mealy" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A tap between clocks".

Chapter 5. About 45 min

## State encoding

Binary, Gray and one-hot, and what each one buys.

Lesson | Time | What students do

State encoding The same states, three ways to store them: binary in four flip-flops, Gray code where one bit changes at a time, and one-hot where every state has its own flip-flop. | 45 min

- Run it: binary
- Gray code
- One bit at a time
- One-hot
- Why spend the flip-flops

### Materials

- 74HC161 4-bit counter
- 74HC194 universal shift register
- 74HC86 quad XOR
- Clock
- LED x 7
- Resistor x 7
- Slide switch

### Check for understanding

Each student finishes "State encoding" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Why spend the flip-flops".

Chapter 6. About 35 min

## Hazards

Bouncing clocks, glitches, ripple and metastability.

Lesson | Time | What students do

Hazards A counter clocked by a real push button counts a dozen for one press. Debounce it with an RC filter and a Schmitt trigger, and meet the other hazards of sequential logic: glitches, ripple and metastability. | 35 min

- Run it: one press, many counts
- Wire the debouncer
- One press, one count
- Three presses, three counts

### Materials

- 74HC14 Schmitt inverter
- 74HC161 4-bit counter
- Capacitor
- Pushbutton
- Resistor x 2

### Check for understanding

Each student finishes "Hazards" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Three presses, three counts".

Chapter 7. About 1 h 5 min

## Boss: a 74HC traffic light

A timer, a decoder and a latch, then your own timing.

Lesson | Time | What students do

Boss: a 74HC traffic light A traffic light with no processor: a 74HC161 is the timer, a 74HC04 and a 74HC08 decode its count into green, yellow and red, and a 74HC74 latches the WALK button. Finish the decode, prove a full cycle, then retime it. | 65 min

- Run it: green, then dark
- Half the cycle is missing
- Decode yellow
- Decode red
- A full cycle
- Latch the WALK button
- Make it yours: retime it

### Materials

- 74HC04 hex inverter
- 74HC08 quad AND
- 74HC161 4-bit counter
- 74HC74 dual flip-flop
- Clock
- Pushbutton
- Resistor
- Traffic light module

### Check for understanding

Each student finishes "Boss: a 74HC traffic light" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours: retime it".

Your class

## Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
