Skip to content
BetterDL

Operand

Also called: operand address, memory operand

A value an instruction works on. In Tiny8 the instruction names the operand's memory address, and the CPU reads the value from there.

An operand is a value an instruction operates on. ADD needs two: the accumulator, and a second value from memory.

Instructions can supply operands in different ways:

  • From memory, by address. Tiny8's LOAD, ADD and SUB work this way: the address field holds an address, and the CPU reads the operand from that address.
  • Implicitly: the accumulator is always the other operand, so it needs no field.
  • Immediately, inside the instruction itself. Tiny8 has none, but the load immediate extension adds one.

The classic slip is to treat the address as the value. LOAD 9 doesn't put 9 in the ACC; it puts in whatever word is stored at address 9.

In Tiny8 the operand's journey is: address field → MAR (in D) → memory → MDR (in E1) → ALU or ACC (in E2).

Worked example

Example

Address versus value

Tiny8 executes 4C with ACC = 30. M[C] = 5.

  1. 1.

    4C is SUB C. C is the operand's address, 12 in decimal.

  2. 2.

    The operand itself is M[C] = 5.

  3. 3.

    ACC = 30 − 5 = 25, not 30 − 12.

Common mistakes

  • Using the address as the value. The operand is the word stored at that address.

  • Forgetting the ACC is an operand too. Tiny8 instructions just don't need to name it.

Practice Operand

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Operand is taught in Basic CPU / Computer Architecture.