Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksBuild a CPUToolsOpen the lab →

Build it from logic gates

Short, hands-on guides to building the core building blocks of digital logic from gates, each with a live circuit you can toggle right on the page and open in the lab.

Every part below is realized and verified by the same simulator that powers the digiwleea lab, so the embedded circuit is the exact one the walkthrough describes. They are grouped roughly in the order a computer is built: arithmetic, then choosing and routing signals, then comparing, then memory, then registers and counters.

Gates from transistors (CMOS)

Where every gate starts: NMOS and PMOS switches wired into CMOS inverter, NAND and NOR gates, then AND, OR and XOR, plus the switches with a third, floating state: transmission gates and tri-state buffers.

Arithmetic

From one column of binary addition to whole 4-bit adders, plus subtractors, multipliers and a 4-bit ALU.

Universal gates: NAND only, NOR only

One gate type is enough to build every other gate, and from them whole adders.

Selecting, routing and decoding

Multiplexers pick a signal, demultiplexers and decoders steer one, encoders and display decoders translate codes.

Logic chips: 74xx and 4000 series

Classic logic chips, each a live circuit with its datasheet pinout: the quad gate chips, a dual flip-flop, a bus buffer, decoders, multiplexers, 7-segment drivers, an adder, shift registers, counters and an ALU.

Comparing numbers

Greater than, equal or less than, decided from the top bit down.

Memory: latches and flip-flops

Feedback that holds a bit, then clocked versions that update on an edge.

Registers and counters

Flip-flops working together: loading a word, shifting, circulating and counting.

State machines

Flip-flops plus next-state logic that react to the bits arriving on an input.

These parts are rungs on the ladder from a single transistor to a working 8-bit CPU. Explore the concepts in the free theory reference, or begin the guided course with Act I for free.

Open the digiwleea lab →