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. Among ordinary LOAD, ADD and STORE instructions in the lesson's load-store model, which access data memory?

    • Loads and stores
    • Every arithmetic instruction
    • Stores, but not loads
  2. Which group describes the programmer-visible interface specified by an ISA?

    • Clock speed, cache capacity, and the number of internal pipeline stages
    • Instruction encodings and behaviour, visible registers, and addressing rules
    • Power-supply voltage, cooling equipment, and the chip's physical dimensions
  3. Two chips with different internals can run the same application binary when both support its required ISA features, execution mode and software environment.

    Circle one:   True   False

  4. A chip changes internal scheduling but preserves the binary's required ISA behaviour, execution mode and software support. Can the old binary still run?

    • Yes; scheduling changed without removing its required support.
    • No; every internal scheduling change requires a new binary file.
    • Only after recompiling; binaries encode the internal schedule.
  5. Model A updates y using LOAD R,[y]; ADD R,#4; STORE [y],R. Model B's ADDMEM [y],#4 reads, adds and writes. Which comparison is correct?

    • A uses 1 instruction combining the actions; B uses 3 separate instructions.
    • A uses 3 instructions; B uses 1 without reading or writing any memory.
    • A uses 3 instructions; B uses 1 that reads, adds and writes.
  6. Which change can preserve the interface used by existing binaries?

    • Removing an ISA register used by existing binary instructions
    • Changing only the chip's internal instruction scheduling
    • Removing an ISA operation used by existing binary instructions
  7. A new chip keeps 8 ISA-visible registers but adds 32 internal physical registers and a deeper pipeline. It preserves the old binary's ISA behaviour, mode and software support. Is recompilation required for these internal changes?

    • Yes; the binary must be rewritten to name all 32 physical registers.
    • No; its encoded interface and other required support remain available.
    • Yes; the binary must be rewritten to name the extra pipeline stages.
  8. An old binary selects ISA register 5. A designer removes that register but says changing its assembly name will keep the binary working. Why is that claim unsafe?

    • The binary automatically selects register 6, changing every instruction's timing.
    • The assembler rewrites the stored binary to select register 6 without rebuilding it.
    • The binary still selects register 5, which the new chip does not provide.
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. Loads and stores · LOAD reads data memory and STORE writes it. ADD uses register values in this model.
  2. Instruction encodings and behaviour, visible registers, and addressing rules · Binary programs depend on instruction encodings and meanings, visible registers and addressing rules. The other groups describe implementation or equipment.
  3. True · Different internals do not prevent compatibility when the required instruction behaviour and software support remain available.
  4. Yes; scheduling changed without removing its required support. · The prompt preserves all stated compatibility requirements. Scheduling can differ without requiring recompilation, although timing may change.
  5. A uses 3 instructions; B uses 1 that reads, adds and writes. · A lists three separate instructions. B combines the memory read, addition and memory write into one instruction, not zero memory accesses.
  6. Changing only the chip's internal instruction scheduling · Internal scheduling can change while ISA behaviour stays the same. Removing an ISA register or operation used by a binary removes part of its required interface.
  7. No; its encoded interface and other required support remain available. · Physical registers and pipeline stages are internal resources. The binary still uses the same eight ISA-visible registers and supported instruction behaviour.
  8. The binary still selects register 5, which the new chip does not provide. · The binary contains an encoded register selector, not its assembly spelling. Renaming cannot supply the removed register or automatically rewrite the binary.
Worksheet · LightMySky