Skip to main content
EnglandComputer ScienceSyllabus dot point

How does assembly language map onto the processor, and what do the different addressing modes mean?

Assembly language and the relationship between assembly instructions and machine code, the instruction set with opcode and operand, the Little Man Computer model, and the addressing modes (immediate, direct, indirect and indexed).

An OCR H446 answer on assembly language and addressing modes: how assembly maps to machine code, the opcode-and-operand structure of an instruction, the Little Man Computer model, and the immediate, direct, indirect and indexed addressing modes with examples.

Generated by Claude Opus 4.813 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

OCR wants the relationship between assembly language and machine code, the opcode-and-operand structure of an instruction, the Little Man Computer (LMC) model, and the four addressing modes (immediate, direct, indirect, indexed) with examples. Expect "explain opcode and operand" and "distinguish the addressing modes" questions.

The answer

Assembly language and machine code

Opcode, operand and the Little Man Computer

Addressing modes

Examples in context

The Little Man Computer is OCR's standard way to set assembly questions, asking you to trace or write a short program. Indexed addressing is how compiled code walks an array in a loop. Indirect addressing underlies pointers and dynamic data structures. Assembly and these modes connect the high-level constructs of Component 02 to the hardware of Component 01. OCR links this to the fetch-decode-execute cycle (which executes these instructions) and to translators (the assembler that produces machine code).

Try this

Q1. State what the opcode and the operand of an instruction each specify. [2 marks]

  • Cue. The opcode specifies the operation; the operand specifies the data, the address of the data, or a register.

Q2. State the difference between immediate and direct addressing. [2 marks]

  • Cue. Immediate: the operand is the actual value. Direct: the operand is the address of the location holding the value.

Q3. State one reason indexed addressing is useful. [1 mark]

  • Cue. Incrementing the index register steps through consecutive memory locations, so it is ideal for processing an array or list in a loop.

Exam-style practice questions

Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

OCR 20206 marksAn instruction is made up of an opcode and an operand. Explain what each part specifies, and explain the difference between immediate and direct addressing.
Show worked answer →

Opcode and operand (up to 2): the opcode specifies the operation to be carried out (for example ADD, STORE, LOAD); the operand specifies the data to be operated on, or the address of that data, or a register.

Immediate versus direct (up to 4): in immediate addressing the operand is the actual value to be used, so the data is part of the instruction itself (for example "ADD 5" adds the literal 5). In direct addressing the operand is the address of the memory location holding the data, so the processor goes to that location to fetch the value (for example "ADD 30" adds the contents of address 30). Markers reward operation-versus-data for opcode/operand, and value-in-the-instruction versus address-of-the-data for the two modes.

OCR 20216 marksExplain the difference between direct, indirect and indexed addressing modes, and state one reason indexed addressing is useful.
Show worked answer →

Direct (up to 2): the operand holds the address of the location containing the data; the processor reads that location.

Indirect (up to 2): the operand holds the address of a location that itself contains the address of the data (a pointer), so the processor follows two steps to reach the data; this allows access to more memory than the operand field could address directly, and the use of pointers.

Indexed (up to 2): the address of the data is found by adding the operand (a base address) to the contents of an index register; incrementing the index register steps through consecutive locations, which is why indexed addressing is useful for processing arrays or lists in a loop. Markers reward the one-step, two-step (pointer) and base-plus-index descriptions, and the array-traversal use for indexed.

Related dot points

Sources & how we know this