Skip to content
0:00 / 0:00

#beneater#8-bitcpu#controllogic

8-bit CPU control logic: Part 1

Ben Eater

1.4M subscribers • 28 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • A classic. People kept recommending it from 2017 to 2023.
  • Presented by Ben Eater

Intermediate. Assumes working knowledge.

1.4M views9 years ago3 recommendations

HardwareSystems programmingCPUs and computer architectureElectronics

Ben Eater designs a custom machine language and explains the control logic needed for an 8-bit breadboard CPU to execute it.

In this video, we walk through writing a program—using a machine language we get to make up! Then we walk through exactly what the control logic will need to do in order to execute the program. See eater.net/bbcpu8-control-logic for more. Support me on Patreon: patreon.com/beneater eater.net x.com/beneater patreon.com/beneater

Why it's here

3 people recommend this

What people say. Highly recommended for its clear, concise explanation of CPU control logic and microcode.

bogomipzon Hacker News • Recommends

On “Build an 8-Bit Computer from Scratch”

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: link to this video

dkerstenon Hacker News • Recommends

On “AMD ymm registers are rolling back”

I found these Ben Eater YouTube videos very useful to understanding what microcode is and how it works: 8-bit CPU control logic link to this 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 hypothe…

pestson Hacker News • Recommends

On “Undocumented 8086 instructions, explained by the microcode”

Ben Eater on YouTube has recreated an 8-bit computer on breadboards. link to this 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.

dkerstenon Hacker News • Mentions

On “6502 “Illegal” Opcodes Demystified”

Yeah, it was my understanding that the opcodes directly encoded what we would nowadays call microcode, that is, bits which selected which CPU component acted on which data1, so these illegal instructions are just unused bit patterns that select various operations just by having those bits set, not something that was ever intended to be actually used. So it would make sense that they're not documented, since they're entirely incidental. 1 link to this video