sodcalculator

10 Tech How-To

Easiest 8-Bit Computer Architecture to Build

Tag 10-48674 · Updated · Standard formula, shown below

Clock cycles per instruction 6
Approx. wire connections
150
Result
Clock speed
1 Hz
You entered
RAM size
16 bytes
You entered
You enter
Clock speed, RAM size
You get
Clock cycles per instruction, Approx. wire connections
Rounding
0 dp

The simplest 8-bit computer architecture to build from discrete logic chips is the Ben Eater-style SAP-1 (Simple-As-Possible) design, popularized by his online videos. It uses a small set of common 74-series logic chips, a straightforward control sequencer, and a minimal instruction set that you can wire up on breadboards without needing a microcontroller or complex programmable logic.

Why SAP-1 Is the Easiest Starting Point

The SAP-1 architecture, described in Albert Paul Malvino’s textbook Digital Computer Electronics, was designed specifically for teaching. It strips a computer down to the absolute essentials: an 8-bit data bus, a 4-bit address bus, 16 bytes of RAM, and a tiny instruction set of just five operations (LOAD, ADD, STORE, HALT, and later SUB, JUMP, and I/O). The control unit is a simple ring counter that steps through micro-operations in a fixed sequence, so you never have to design a complex finite-state machine.

Compared to more ambitious homebrew CPUs like the Gigatron or the Magic-1, the SAP-1 uses far fewer chips—typically around 20 to 30—and every chip is a standard 74LS series logic gate, latch, or counter. This makes it ideal for breadboarding, because you can probe every signal with a logic probe or LED and debug one module at a time.

How the SAP-1 Works

The SAP-1 is a von Neumann machine with a shared bus. It has four main blocks:

  • Program counter (PC): a 4-bit counter that holds the address of the next instruction.
  • RAM: 16 bytes of static RAM (like the 74LS189) that stores both program and data.
  • Arithmetic logic unit (ALU): an 8-bit adder (74LS283) plus a register (74LS273) for the accumulator.
  • Control unit: a ring counter (74LS74 flip-flops or a 74LS163) that generates the enable and load signals for every register in the correct sequence.

Each instruction takes several clock cycles. For example, a LOAD instruction (opcode 0001) might take 6 steps: fetch the opcode, increment the PC, fetch the operand, increment the PC, then load the value into the accumulator. The control unit simply counts from 0 to 5 and activates the right signals at each step.

The clock is usually a 555 timer or a simple astable multivibrator running at 1 Hz to 10 Hz, so you can watch each step happen in real time. This slow speed is a feature, not a bug—it lets you see exactly what the computer is doing.

How to Choose an Architecture

If you want the absolute minimum effort, choose the SAP-1. But there are a few variations that trade complexity for capability:

  • SAP-2: Adds more instructions, a second register, and a 16-bit address bus. Still manageable but roughly double the chips.
  • Ben Eater’s 8-bit breadboard computer: A slightly expanded SAP-1 with more RAM, a 7-segment output, and a more robust control unit. It is the most documented build, with detailed schematics and videos.
  • Gigatron TTL computer: A complete 8-bit computer with VGA output and a BASIC-like interpreter, but it uses a radically different architecture (no program counter, uses a 4-bit ALU) and is much harder to understand.

For a first build, the SAP-1 is the clear winner. It is small enough to finish in a weekend, yet it demonstrates all the core concepts: buses, registers, ALU, control signals, and machine code.

Common Problems and How to Avoid Them

Breadboard builders often hit the same issues. Here are the most frequent:

  • Faulty jumper wires: Breadboard wires break internally. Always test wires with a multimeter before blaming your logic.
  • Power supply noise: The 74LS series chips are sensitive to voltage spikes. Use a regulated 5V supply and add a 0.1 µF decoupling capacitor near each chip’s power pins.
  • Missing pull-up or pull-down resistors: Unused inputs on TTL chips float high, but they can pick up noise. Tie unused inputs to ground or VCC.
  • Incorrect wiring of the 555 timer: The 555 pinout is easy to mix up. Double-check the datasheet.
  • Propagation delays: At 1 Hz, this is not an issue, but if you increase the clock speed, you may need to add wait states or use faster logic families.

Cost and Parts List

You can build a basic SAP-1 for under $50 if you already have a breadboard and power supply. The main components are:

  • 74LS283 (4-bit binary adder) – 2 chips
  • 74LS273 (octal D flip-flop) – 3 chips (for A, B, and OUT registers)
  • 74LS189 (16×4 RAM) – 2 chips (or a 74LS189 with 16 bytes)
  • 74LS163 (4-bit counter) – 1 chip for the program counter
  • 74LS04 (hex inverter) – for control logic
  • 74LS08 (AND gates) and 74LS32 (OR gates) – for control signals
  • 555 timer – for the clock
  • LEDs and resistors – for output and debugging

You can also buy a complete kit from Ben Eater’s store, but the individual chips are cheap if you source them from electronics distributors. Note that the 74LS189 RAM is obsolete, so you may need to use a 74LS189 substitute or an SRAM like the 6116 and adapt the wiring.

Safety and Good Practice

Working with TTL logic is safe at 5V, but there are a few precautions:

  • Always disconnect power before changing wiring.
  • Do not apply more than 5V to any chip pin—this will destroy it.
  • Use a current-limiting resistor (e.g., 220Ω) in series with any LED.
  • Breadboards have a current limit of about 1A per rail; the SAP-1 draws well under that, but avoid adding too many extra LEDs.
  • If you use a wall adapter, ensure it is regulated and provides 5V DC, not 9V or 12V.

Alternatives to Discrete Logic

If you want the experience of building a CPU but prefer not to deal with dozens of wires, consider these alternatives:

  • FPGA (Field-Programmable Gate Array): You can implement a SAP-1 in Verilog or VHDL and program it onto a cheap FPGA board like the Cyclone IV. This is easier to modify and debug, but you lose the physical wiring experience.
  • Microcontroller-based emulation: Use an Arduino or similar to emulate the SAP-1. This is the easiest of all, but it is not really building a computer from logic gates.
  • Logic simulator software: Programs like Logisim or Digital let you design and test the SAP-1 on your computer before building it in hardware. This is an excellent way to verify your design.

For most hobbyists, the physical build is the most rewarding. The SAP-1 strikes the perfect balance between simplicity and authenticity.

Frequently Asked Questions

How long does it take to build a SAP-1?

For a beginner, expect to spend 20 to 40 hours spread over a few weekends. If you follow Ben Eater’s videos module by module, you can finish in about two weeks of evening work. The most time-consuming part is troubleshooting wiring errors, so take it slow and test each module before moving on.

Can I use the SAP-1 to run actual programs?

Yes, but only very simple ones. With 16 bytes of RAM and a handful of instructions, you can write small programs that add numbers, loop, or blink LEDs. It is not powerful enough for anything practical, but that is not the point—it is a learning tool.

What is the difference between the SAP-1 and Ben Eater’s computer?

Ben Eater’s design is essentially an expanded SAP-1. It adds a 16-byte RAM (like the SAP-1), but also includes an EEPROM for the control logic, a 7-segment output, and a more flexible clock module. The core architecture is the same, but Eater’s version is easier to modify because the control signals are stored in an EEPROM instead of hard-wired logic gates.

Do I need to know electronics before building?

You should be comfortable with basic concepts like voltage, current, and how to read a schematic. You do not need to be an expert, but you must be able to identify chips and follow a wiring diagram. If you have never used a breadboard, practice with a simple LED circuit first.

Can I build it on a PCB instead of a breadboard?

Yes, but it is harder. A PCB requires you to design the board layout, solder all components, and you cannot easily change connections. Breadboards are ideal for learning because you can rewire quickly. Once your design is stable, you could transfer it to a PCB for a permanent build.

Is the SAP-1 a real computer?

Yes, it is a real, functioning computer, albeit a very primitive one. It has a CPU (the ALU and registers), memory, and a control unit. It executes machine code instructions stored in RAM. It just lacks a keyboard, display, and operating system—those are external peripherals you can add later.

Related

Formula used
in clk | Clock speed | Hz | 1 | 0 | 1000000
in ram | RAM size | bytes | 16 | 1 | 256
out steps | Clock cycles per instruction | - | 6 | 0
out wires | Approx. wire connections | - | 150 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More in this bed

The whole Tech How-To bed →