I'm looking for a structured book or video course that teaches digital electronics and logic from the absolute basics, ideally with practical examples or labs. My long-term goal is to understand how a CPU works at the hardware level, including clocks, flip-flops, registers, counters, ALUs, memory, buses, and instruction execution. I don't want to start with CPU architecture immediately, though. I've seen Ben Eater's 8-bit computer series, but I'm wondering whether it would make more sense after learning the fundamentals. What learning path or combination of resources would you recommend?
3 Answers
A solid progression would be to begin with *Code* by Charles Petzold. It introduces concepts like relays, binary, and logic gates in a very approachable way. After that, work through NAND2Tetris, which lets you build up a computer step by step from basic gates through registers, an ALU, memory, and a simple CPU. Ben Eater’s series would make a great practical follow-up once those ideas are familiar.
If you want to understand electronics at the physical component level, an introductory course on semiconductor devices can cover diodes, transistors, and MOSFETs. That’s useful for learning how circuits are electrically implemented, but it isn’t strictly necessary for understanding a CPU’s digital architecture. You can study logic design and computer organization first, then return to transistor-level details if you want deeper hardware knowledge.
Don’t skip sequential logic. Learn how latches and flip-flops work before studying registers and counters, since registers are essentially collections of storage elements controlled by a clock. From there, combinational circuits such as adders and multiplexers lead naturally into the ALU and the rest of a simple CPU.

That order makes the gates-to-registers-to-ALU-to-CPU progression much easier to follow. NAND2Tetris is especially useful because it combines the explanations with hands-on construction and testing.