Skip to content
Tactiverge

Campaign C-03 · Levels 1–5

Build a Computer

From two switches to a pipelined processor, one layer at a time.

Every app on every phone comes down to switches that are on or off. Billions of them, switching billions of times a second.

In this campaign you build a computer in your head and in the browser: counting in binary, combining gates into an adder, making the adder fast, keeping data close in a cache and finally overlapping instructions in a pipeline.

You are the chief architect. At every layer you face the same question real chip designers face: faster, smaller, or simpler?

What this campaign connects

Build Nights · proposed, no date

Optional. These nights are part of a proposed programme; none is scheduled.

The roadmap

0 of 5 done

1Switches thatcount2An adding machine3Keep data close4Overlap everything★Architectureproposal

Checking whether you are signed in…

  1. Milestone 1 of 4

    Switches that count

    Two lights can say four things. How many can eight say?

    Goal: Count and convert in binary, and combine AND, OR and NOT into a truth table.

    Experiment

    Set the adder to 4 bits with ripple carry. Look at the carry chart: why does each bit wait for the one before it?

    Open Adder architecture: ripple carry or carry lookahead in Simulation OS

    Design decision: How many bits for a classroom counter that must reach 200?

    No single right answer. Pick one and read what it costs you.

    Practice

    What is 1011 in binary as a decimal number?

    8 + 0 + 2 + 1 = 11.

  2. Milestone 2 of 4

    An adding machine

    A full adder adds three bits. Chain them and you can add anything, slowly.

    Goal: Build a ripple-carry adder and predict its gate count and delay.

    Experiment

    Make the adder 32 bits wide with 4-bit lookahead blocks. Predict the gate count and the critical path before you run.

    Open Adder architecture: ripple carry or carry lookahead in Simulation OSDesign Challenge DC-05: The 1-nanosecond adder

    Design decision: Ripple or lookahead?

    No single right answer. Pick one and read what it costs you.

    Practice

    A ripple-carry adder uses 5 gates per bit. How many gates for 8 bits, and what is its critical path in gate delays?

    5 × 8 = 40 gates; 2n + 1 = 17 gate delays.

  3. Milestone 3 of 4

    Keep data close

    Main memory is a long walk away. A cache is a small shelf right next to the processor.

    Goal: Explain hit rate, locality and why associativity helps.

    Experiment

    Scan a 64-byte array twice. Grow the cache one step at a time. When does the second pass become all hits?

    Open Cache hit rate vs size and associativity in Simulation OS

    Design decision: Bigger cache or smarter cache?

    No single right answer. Pick one and read what it costs you.

    Practice

    Hit time 1 clock, miss rate 10 %, miss penalty 20 clocks. What is the average memory access time?

    AMAT = 1 + 0.1 × 20 = 3 clocks.

  4. Milestone 4 of 4

    Overlap everything

    While one instruction is being decoded, the next can already be fetched.

    Goal: Measure CPI and explain the stalls that pipelining introduces.

    Experiment

    Turn forwarding off and on. Then change the branch penalty. Which upgrade removes more stalls for this workload?

    Open Pipeline throughput vs hazard rate in Simulation OSDesign Challenge DC-06: Pick your pipeline

    Design decision: Which upgrade first?

    No single right answer. Pick one and read what it costs you.

    Practice

    A 5-stage pipeline runs 100 instructions with no stalls. How many clocks does it take?

    4 clocks to fill the pipe plus 100 = 104 clocks.

Finale · culminating project

Architecture proposal

Propose a small processor for a battery-powered device: pick an adder, a cache and a pipeline configuration, justify each with recorded runs, and explain what you would change for a desktop computer instead.

Deliverables

  • A block diagram of the datapath
  • Recorded runs for adder, cache and pipeline choices
  • A table comparing your design with one alternative at each layer
  • A paragraph on what changes for a desktop computer

Rubric

Project rubric: each criterion with descriptors for developing, secure and excellent work
CriterionDevelopingSecureExcellent
Requirements are testableNeeds a qualified reviewerGoals are stated in words like 'good' or 'fast'.Every requirement has a number, a unit and a test.Requirements have margins and say which matter most when they conflict.
Evidence from runsCheckable from runsOne run is quoted.Each claim quotes a recorded run (parameters + seed) that anyone can re-run.Claims rest on fair comparisons where one variable changed at a time.
Trade-offs: speed against area and powerNeeds a qualified reviewerOne option is chosen without comparison.At least two options are compared with numbers and the choice is explained.The write-up shows what was given up, for whom, and what would change the decision.
Model limitsNeeds a qualified reviewerThe simulation is treated as reality.Two assumptions are named and their likely effect stated.Proposes a test that would check the most important assumption.
Technical communicationNeeds a qualified reviewerNumbers appear without units or context.A clear one-page summary: decision first, evidence second.A stranger could rebuild the design from the write-up.
  • At which layer did a small change make the biggest difference?
  • Which simplifications in the models flatter your design?
  • How would you explain a cache to someone who has never written code?

Private. Saved when you leave the box.

Finished the project?

Mark it done when your deliverables are complete. Reviewer-judged criteria are never scored automatically.

Lessons we plan to write for this campaign

Not written yet, so not linked. The campaign works without them.

  • Registers and the clock: sequential logic
  • Instruction encoding
  • Branch predictors

Content status: technically checked (automated checks only). Not yet reviewed by an educator. Simulations are simplified educational models with stated assumptions.