Lompat ke konten

Labs · 9618 AS 4.1–4.3

Tiny CPU

Program a little computer in real 9618 assembly language. Watch every fetch, decode and execute move along the buses.

28 levelsFree bench

In the exam

Exam questions on what this lab teaches, with the points that gain marks.

9618/31 May/June 2022 · Question 910 marks

(a) Address 500 contains the value 100 and address 100 contains the value 20. State the addressing mode and the contents of ACC after LDM #500, LDD 500 and LDI 500. (b) Using only the given instructions, write assembly code to store the constant 20, add it to the value stored in the address contained in variable Y, and store the result in variable Z.

Points that gain marks

  1. (a) LDM #500: immediate addressing, ACC = 500.
  2. LDD 500: direct addressing, ACC = 100.
  3. LDI 500: indirect addressing, ACC = 20.
  4. (b) LDM #20, then STO Twenty: the constant is stored at a labelled address away from the program code.
  5. LDI Y loads the value at the address held in Y.
  6. ADD Twenty adds the constant, using the labelled address.
  7. STO Z stores the result; Y and Z are labelled addresses away from the code.

In this lab: 'Trace table: four ways to load' compares the addressing modes; 'Exam: constant + pointer' is part (b).

9618/11 October/November 2022 · Question 6(a)(i)4 marks

Trace the program currently in memory using the trace table (ACC, IX, addresses 100, 101, 110–112, output).

Points that gain marks

  1. ACC: 66, 1, 65, 66, 1, 2, 35, 2, 50.
  2. IX: 0, 1, 2.
  3. Address 100: 0, 1, 2; address 101: 0, 66.
  4. Output: 2.

In this lab: Level 'Trace table: count to #'.

9618/12 October/November 2022 · Question 7(a)5 marks

Trace the program currently in memory using the trace table, stopping when line 90 is executed for a second time.

Points that gain marks

  1. ACC: 1, 2, 0, 1, 4, 6, 1, 2.
  2. IX: 0, 1, 2.
  3. Address 100: 0, 1, 2; address 101: 0, 2, 6.
  4. Addresses 102, 103 and 110–112 do not change.

In this lab: Level 'Trace table: CMI and a stop line'.

9618/13 October/November 2022 · Question 6(a)(i)4 marks

Trace the program currently in memory using the trace table (ACC, IX, addresses 100, 101, 110–112, output).

Points that gain marks

  1. ACC: 1, 97, 65, 1, 2, 1, 49.
  2. IX: 0, 1.
  3. Address 100: 1, 2; address 101: 0, 1.
  4. Output: 1.

In this lab: Level 'Trace table: SUB #32'.

9618/12 October/November 2023 · Question 9(b)4 marks

Trace the program currently in memory using the trace table when the input is '1'.

Points that gain marks

  1. ACC: 49, 51, 49, 65.
  2. IX: 0, 1.
  3. Address 100: 0, 65; address 101: 0, 49.
  4. Output: A.

In this lab: Level 'Trace table: input 1'.

IGCSE 0478/11 October/November 2025 · Question 6(a)6 marks

A computer with a Von Neumann architecture has a CPU. Complete the statements about the operation of the CPU, using terms from a list.

Points that gain marks

  1. The program counter stores the address of the next instruction. This address is sent to the memory address register.
  2. The instruction is retrieved from RAM and stored in the memory data register.
  3. It is sent to the current instruction register, where it is decoded by the control unit.
  4. The instruction is decoded using an instruction set.

In this lab: Press '⟳ Watch the cycle' on any level: PC → MAR, then MDR, then CIR, then the control unit decodes.

IGCSE 0478/13 October/November 2025 · Question 2(a)–(b)5 marks

(a) Give the name of the first register used in the fetch part of the cycle. (b)(i) Describe the role of the control unit (CU). (ii) Name the register that holds the instruction while it is decoded.

Points that gain marks

  1. (a) Program counter (PC).
  2. (b)(i) It sends control signals to other components, using the control bus, to manage the flow of data through the CPU.
  3. (b)(i) It decodes an instruction, using an instruction set.
  4. (b)(ii) Current instruction register (CIR).

In this lab: Press '⟳ Watch the cycle' on any level and follow the registers.

IGCSE 0478/12 May/June 2024 · Question 5(a)7 marks

Complete the paragraph about fetching an instruction into the CPU to be processed, using terms from the list. The program counter contains the … of the next instruction; this is sent to the … using the address bus, then to the … . The instruction stored at that location is sent to the …, using the … bus. It is then sent to the … that is built into the … .

Points that gain marks

  1. address; memory address register (MAR); random access memory (RAM).
  2. memory data register (MDR); data (bus).
  3. current instruction register (CIR); control unit (CU).

In this lab: Press '⟳ Watch the cycle' on any level: PC → MAR → memory → MDR → CIR, then the control unit decodes.

IGCSE 0478/12 October/November 2023 · Question 3(b)2 marks

The CPU contains a memory address register (MAR). Describe the role of the MAR in the fetch–decode–execute cycle.

Points that gain marks

  1. It stores addresses …
  2. … of the next instruction or data to be fetched, or where data is to be written to.

In this lab: The MAR box on every level: press '⟳ Watch the cycle' to see it take each address from the PC.

IGCSE 0478/12 October/November 2025 · Question 411 marks

A Von Neumann CPU performs the fetch–decode–execute cycle. (a) Complete and annotate the diagram (control unit with CIR, ALU with ACC) to show how instructions are decoded and executed. (b) The CPU is dual core, at 2.4 GHz. Describe what is meant by a core. (c) Explain two ways the performance of the CPU could be increased.

Points that gain marks

  1. (a) The CIR is in the control unit and stores the instruction; the CU decodes it using the instruction set (opcode and operand) and sends a signal to the ALU; the ACC is in the ALU and stores the data; the ALU executes the instruction.
  2. (b) An independent processing unit that carries out the FDE cycle, with its own registers.
  3. (c) More cores: more instructions processed at the same time. A higher clock speed: more instructions per second. More cache: more frequently used data and instructions kept close, faster to access than RAM.

In this lab: Press '⟳ Watch the cycle' on any level: the instruction goes into the CIR, the control unit decodes it, and the result goes into the ACC.

IGCSE 0478/12 October/November 2025 · Question 34 marks

A programmer uses assembly language to create a program for a coffee machine. (a) Describe what is meant by assembly language. (b) Identify the translator needed for assembly language. (c) Tick one advantage of assembly language: close to human language; memory efficient; easy to debug; machine independent.

Points that gain marks

  1. (a) A low-level language that uses mnemonics, used to communicate directly with the computer hardware.
  2. (b) An assembler.
  3. (c) B: it is memory efficient.

In this lab: Every level: you write mnemonics such as LDM, ADD and OUT, and each line is one machine instruction in memory. The Two-Pass Assembler lab shows how an assembler translates them.

The question as printed in the exam paper

More real experiments

All labs →

Masuk atau buat akun

IGCSE, A-Level & AP