HackerTube.dev

8-bit CPU control logic: Part 1

Ben Eater · 1.5M views · 2017-04-16 · 27:52

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

Ben Eater writes a program in a made-up machine language and walks through the control logic an 8-bit breadboard CPU needs to execute it. It is part of his build-an-8-bit-computer series.

On Hacker News

Recommended as the key video for understanding control logic and microcode.

Recommended by 3 HN people across 3 months · HN mentions 2017–2023

Topics

Search by tags

What people said

bogomipz · 2017-06 · Strong recommendation

This is really amazing. In addition to the interesting project this individual has a great gift for articulating everything in a concise manner and with a very pleasant cadence. What a great teacher. Thanks for sharing. I'm looking forward to seeing the rest of this series. If you only have a limited amount of time I would highly recommend the control logic video: [VIDEO]

Read the original HN comment ↗
pests · 2023-07 · Recommendation

Ben Eater on YouTube has recreated an 8-bit computer on breadboards. [VIDEO] That is the start of the videos where the control logic gets microcoded. Its pretty basic but over the next few videos he comes up with about 10 different OPCODES and programs their microcode (a series of control logic activations). Its pretty amazing to see it all come together and work in the end.

Read the original HN comment ↗
dkersten · 2023-03 · Recommendation

I found these Ben Eater YouTube videos very useful to understanding what microcode is and how it works: 8-bit CPU control logic [VIDEO] 8-bit CPU reprogramming microcode [LINK] In short, the microcode instructions are a bunch of flags that enable different parts of the processor during that clock cycle (eg is data being loaded off the bus into a register? Is the adder active? Etc), so to implement an instruction that says add value from memory a to value from memory b and store in memory c, the microcode might be: copy memory a onto bus, store bus to register, copy memory b to bus, store b to register, add both register and put result online bus, store value on bus to memory c. (In a hypothetical simple cpu like the one Ben built, a real one is obviously much more sophisticated). So in Ben’s toy CPU, the instructions are just indices nto an EEPROM that stored the control logic but pattern “microcode” for each instruction, and IIRC each instruction takes however many cycles the longest instruction requires (in real life that would be optimised of course). This is also how some processors like the 6502 have “undocumented” instructions: they’re just bit patterns enabling parts of the processor that weren’t planned or intended. So you can see that it may be possible to fix a bug in instructions by changing the control logic in this way, even though the actual units being controlled are hard wired. I guess it very much depends on what the bug is. Of course I only know how Ben’s mi

Read the original HN comment ↗

Sources

Video by Ben Eater, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources