Source: https://mokxi.com/teachers/plans/digital-logic-memory
Updated: 2026-11-11

Lesson plan

# Digital logic and memory lesson plan

Build logic from individual gates, then make a bit persist, count and move through a register.

2 chapters, 4 lessons, about 4 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

- Combine gates, then cross-couple them so a circuit remembers one bit.
- Turn stored bits into a counter, then clock a byte through a real register.

### Materials for the whole unit

- 74HC00 quad NAND
- 74HC595 shift register
- 74HC74 dual flip-flop x 2
- Clock
- Full-size breadboard
- Inverter
- LED x 8
- Logic gate x 2
- Pushbutton x 2
- Resistor x 8
- Slide switch

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 2 h

## Decisions and state

Combine gates, then cross-couple them so a circuit remembers one bit.

Lesson | Time | What students do

Gates, as real chips AND, XOR and NOT with two buttons and three lamps. Fill in the truth tables by pressing, and find out what a real chip has that the symbol does not. | 60 min

- Two inputs, three answers
- Both, for AND
- One, for XOR
- Nothing, for NOT
- Fill in the table
- What a real chip has that a symbol does not

One bit of memory Two NAND gates wired into each other hold an answer after the input goes away. The smallest memory there is, and the reason a switch stops bouncing. | 60 min

- Each gate watches the other
- Set it
- Reset it
- It is still there
- Read it as a number
- What it is actually used for

### Materials

- 74HC00 quad NAND
- Full-size breadboard
- Inverter
- LED x 3
- Logic gate x 2
- Pushbutton x 2
- Resistor x 5
- Slide switch

### Check for understanding

Each student finishes "One bit of memory" 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: "What it is actually used for".

Chapter 2. About 2 h

## Count and shift

Turn stored bits into a counter, then clock a byte through a real register.

Lesson | Time | What students do

Flip-flops that count A D flip-flop wired to toggle halves a clock. Four of them in a chain count in binary, and the lamps spell out the number. | 60 min

- A latch that waits for a clock
- Watch the first stage halve the clock
- Chain them
- Read it as binary
- Make it count down
- Why nobody builds it this way

Eight outputs from three wires A 74HC595 driven by a clock and a switch, with no processor anywhere. Load a pattern by hand, watch it march, and find out what the latch is for. | 60 min

- A row of flip-flops in a line
- Fill it with ones
- Empty it again
- Load a pattern by hand
- What the second row is for
- Count the pins you saved

### Materials

- 74HC595 shift register
- 74HC74 dual flip-flop x 2
- Clock
- Full-size breadboard
- LED x 8
- Resistor x 8
- Slide switch

### Check for understanding

Each student finishes "Eight outputs from three wires" 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: "Count the pins you saved".

Your class

## Teach this unit as a class

Start a class from this course and its 4 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. 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. Build a vending machine 6 lessons, about 5 h. Every unit All the courses as ready-made units, on the teachers page.
