I'm looking for a structured book or video course that teaches digital electronics and computer hardware from the absolute basics. My long-term goal is to understand how a CPU works at the hardware level, including clocks, flip-flops, registers, counters, ALUs, memory, instruction execution, and buses. I'd prefer to build up gradually rather than start with CPU architecture immediately, and practical examples or hands-on labs would be a big plus. I've watched some of Ben Eater's 8-bit computer series, but I'm wondering whether it makes more sense after learning the fundamentals. What learning path or resources would you recommend?
4 Answers
A good progression is Charles Petzold’s *Code* first, followed by NAND2Tetris, and then Ben Eater’s 8-bit computer series. That order takes you from simple switches and logic gates through flip-flops, registers, ALUs, and finally a working CPU, so each later step has some context.
You don’t have to master all of electronics before studying CPUs. A practical digital-logic sequence covering Boolean algebra, gates, combinational circuits, sequential circuits, memory, and arithmetic units will get you much closer to your goal. After that, architecture-focused material will make more sense.
Make sure you learn flip-flops before registers. Registers, counters, and memory are built from sequential logic, so understanding how flip-flops store state makes the later CPU topics much easier.
If by “electronics” you mean the physics behind the components, start with an introductory course on solid-state devices. It can explain how diodes, transistors, and MOSFETs behave electrically. For understanding CPU organization, though, you usually don’t need that much semiconductor physics; digital logic and computer architecture are the more direct route.

NAND2Tetris is especially useful because it gives you structured projects and lets you build the computer layer by layer instead of only reading about it.