Source: https://mokxi.com/learn/digital-logic-course
Updated: 2026-11-11

Electrical track
Digital logic

# A digital logic course, from gates to memory to a CPU

Gates as real chips, a latch that remembers, flip-flops that count and a shift register, then adders, an ALU, RAM and a CPU built from one NAND gate.

Free In your browser 2 courses, 27 lessons, about 20 hours

Start free Gates, as real chips See the course

Overview

## How you will learn it

Every computer is built from logic gates, and digital logic is the subject that shows how. It starts with truth tables and ends with circuits that remember, count and compute.

Digital logic and memory is a short course on real chips on a breadboard. From gates to a computer goes all the way: one NAND gate, packaged into chips you then build the next chip from, up to a CPU of your own and a computer that runs your program.

Outcomes

## What you will learn

- Use AND, OR, NOT, NAND and XOR gates, and build any of them from NAND.
- Make a bit persist with a latch and count with flip-flops.
- Build adders, a multiplexer, decoders and an 8-bit ALU.
- Put registers, RAM and a program counter together into a working CPU.

Your route

## The courses and lessons to take

Every lesson opens in the editor right away, signed in or not, and the simulator checks each step.

- Step 1 · 4 lessons · 4 h

### Digital logic and memory

Gates and memory on real chips.

- 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.
- 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.
- 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.
- 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.
Every lesson in the course
- Step 2 · 23 lessons · 16 h

### From gates to a computer

From one NAND gate to a computer.

- The one gate Meet the NAND gate, the only gate you need. Wire it between two switches and a lamp, read its truth table, and see why every other gate can be built from it.
- Carrying: the full adder Add three bits, the two you are adding and the carry from the column before. Two half adders and an OR make a full adder, the building block of every adder.
- The 8-bit ALU Eight ALU slices in a carry chain, a zero detector and a carry flag: the ALU the Kestrel CPU computes with.
- RAM: memory with addresses Eight registers, a decoder that sends a write to one of them, and a MUX tree that reads one back: eight bytes of memory you can address.
- Your first computer A step clock, a program ROM, your Kestrel and a terminal on one canvas: a computer built from NAND gates, running a program you can change.
Every lesson in the course

Keep going

## Guides and tools on the same subject

Guide

### Logic gates and their truth tables

Open it

Guide

### Build a computer from NAND gates

Open it

Simulator

### Logic gate simulator

Open it

Track

### Electrical track

Current and voltage you can see, then transistors, op-amps, filters, power and PCBs. Every circuit runs in a real circuit simulator in your browser.
See the whole track

Questions

## Questions people ask

Is digital logic hard to learn?

The first ideas are simple: a gate is a small rule about ones and zeros. It gets deep as you combine them, which is why the course builds one chip at a time.

Can you really build a CPU from NAND gates?

Yes. From gates to a computer starts with one NAND gate and ends with a CPU that runs a program you write, every part built from the ones before it.

Is this useful for a computer science degree?

Yes. Digital logic and computer organization are core classes, and building the parts yourself makes them much easier.
