Instruction Set Architecture as a Contract · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

The promise between chips and programs

Computing · Computer Systems · ages 18-19
Name ______________________   Date ____________
  1. This design keeps arithmetic in registers. What touches memory?

    • Only loads and stores
    • Every arithmetic operation
    • Only the compiler
  2. What does an instruction set fix?

    • How fast the chip runs
    • Which operations exist, which registers are visible, and how memory is addressed
    • How big the power supply is
  3. Two chips with different internals can run the same binary if both keep the contract.

    Circle one:   True   False

  4. A chip schedules work differently inside but keeps the same visible operations and registers. Will old programs still run?

    • Yes, because programs only see the contract
    • No, because the inside changed
    • Only after recompiling
  5. Compared with load-store, what does operating directly on memory cost?

    • Programs need no registers at all
    • Memory becomes as fast as registers
    • Each operation grows more complex, while loads and stores are saved
  6. Which change keeps the promise to old programs?

    • Renaming a visible register
    • Changing how work is scheduled inside the chip
    • Removing an operation compilers use
  7. What does the instruction set promise a compiler?

    • Every chip will run at the same speed
    • These operations and registers will be there on every chip that keeps the contract
    • No chip will ever gain new internals
  8. A designer renames a visible register and says nothing breaks. What is wrong?

    • The schedule inside runs slower
    • The chip uses more power
    • Programs address that register, so the contract changed
LightMySky · lightmysky.comW1-mt_pbwHRePY5M-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

The promise between chips and programs W1-mt_pbwHRePY5M-s1

  1. Only loads and stores · Arithmetic stays in registers; only loads and stores reach memory.
  2. Which operations exist, which registers are visible, and how memory is addressed · The contract names operations, visible registers, and addressing.
  3. True · Same promise, same programs, whatever the inside looks like.
  4. Yes, because programs only see the contract · Programs touch the contract, and the contract did not move.
  5. Each operation grows more complex, while loads and stores are saved · Memory operations save loads and stores but each step does more.
  6. Changing how work is scheduled inside the chip · Scheduling hides below the line; the other two rewrite the contract.
  7. These operations and registers will be there on every chip that keeps the contract · The compiler builds on operations and registers that the contract guarantees.
  8. Programs address that register, so the contract changed · Compiled programs name that register, so the rename breaks them.
Worksheet · LightMySky