Processor fundamentals and assembly language – A Level Computer Science (9618)

20 questions · page 1 of 2 · Clear filters

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
1
9618/11/O/N/25 · Question 4Oct/Nov 2025Paper 114 marks
Loading question…
Question text

4
The table shows part of the instruction set for a processor. The processor has one register, the
Accumulator (ACC).
Instruction
Explanation
Opcode
Operand
AND
#n / Bn / &n
Bitwise AND operation of the contents of the ACC with the
operand
AND
<address>
Bitwise AND operation of the contents of the ACC with the
contents of <address>
XOR
#n / Bn / &n
Bitwise XOR operation of the contents of the ACC with the
operand
XOR
<address>
Bitwise XOR operation of the contents of the ACC with the
contents of <address>
OR
#n / Bn / &n
Bitwise OR operation of the contents of the ACC with the
operand
OR
<address>
Bitwise OR operation of the contents of the ACC with the
contents of <address>
LSL
#n
Bits in ACC are shifted logically n places to the left. Zeros
are introduced on the right-hand end.
LSR
#n
Bits in ACC are shifted logically n places to the right. Zeros
are introduced on the left-hand end.
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #127
B denotes a binary number, e.g. B10010001
& denotes a hexadecimal number, e.g. &4A
(a) The ACC currently contains the following positive binary integer:
0
0
0
1
1
1
1
0
Write a bit manipulation instruction that uses a binary shift to change the contents of the ACC to:
0
1
1
1
1
0
0
0
Instruction … [1]
ĬÑĊ®Ġ´íÈõÏĪÅĊßù¶Ā×
,
,
(b) The ACC currently contains the following positive binary integer:
1
1
1
0
0
0
1
1
Write the contents of the ACC after the instruction XOR &12 is carried out.
[1]
(c) The ACC currently contains the following positive binary integer:
1
1
1
0
0
0
1
1
Write the contents of the ACC after the instruction AND #63 is carried out.
[1]
(d) The ACC currently contains the following positive binary integer:
1
1
1
0
0
0
1
1
The current contents of memory are:
Data
Address
00100100
98
00110001
99
00110011
100
10100011
101
10101100
102
Write the contents of the ACC after the instruction OR 100 is carried out.
[1]
ĬÓĊ®Ġ´íÈõÏĪÅĊßû¶Ā×

2
9618/11/O/N/25 · Question 6Oct/Nov 2025Paper 117 marks
Loading question…
Question text

6
(a) The processor uses several registers, including the Accumulator (ACC) and the Current
Instruction Register (CIR).
Complete the table by describing the role of each register.
Register
Role
…
ACC
…
…
CIR
…
[2]
(b) Increasing the number of cores in a processor can affect the performance of a computer.
Describe the drawbacks of increasing the number of cores in a processor.
…
…
…
… [2]
(c) State three differences between Dynamic RAM (DRAM) and Static RAM (SRAM).
1 …
…
2 …
…
3 …
…
[3]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞû¸þ×

3
9618/12/O/N/25 · Question 3Oct/Nov 2025Paper 1210 marks
Loading question…
Question text

3
(a) (i)
State what is meant by relative addressing.
…
…
… [1]
(ii)
Registers such as the Accumulator (ACC) and the Index Register (IX) are used in the
CPU.
Identify two special purpose registers used in the CPU. Do not include the ACC or IX in
your answers.
1 …
2 …
[2]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝü·þ×
,
,
(b) The following table shows part of the instruction set for a processor. The processor has two
registers: the ACC and an IX.
Instruction
Explanation
Opcode
Operand
LDM
#n
Immediate addressing. Load the number n to ACC
LDD
<address>
Direct addressing. Load the contents of the location at the given
address to ACC
LDI
<address>
Indirect addressing. The address to be used is at the given address.
Load the contents of this second address to ACC
LDX
<address>
Indexed addressing. Form the address from <address> + the contents
of the index register. Copy the contents of this calculated address to
ACC
LDR
#n
Immediate addressing. Load the number n to IX
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #127
The current contents of the main memory and the index register are shown.
Address
Instruction
8
98
16
99
3
100
98
101
32
102
2
IX
Write the contents of the ACC after each instruction is executed.
Instruction
Value in ACC
LDM #98
LDI 101
LDX 100
[3]
ĬÍĊ®Ġ´íÈõÏĪÅĊßú·Ā×
,
,
(c) A student buys a new computer. The table shows the specifications of the old computer and
the new computer.
Old computer
New computer
1.8 GHz dual core processor
2.3 GHz dual core processor
16 MB cache
32 MB cache
Explain why increasing the clock speed and increasing the cache memory will improve the
performance of the computer.
Clock speed …
…
…
…
Cache memory …
…
…
…
[4]
ĬÏĊ®Ġ´íÈõÏĪÅĊßü·Ā×

Advertisement
4
9618/13/O/N/25 · Question 6Oct/Nov 2025Paper 1311 marks
Loading question…
Question text

6
The following table shows part of the instruction set for a processor. The processor has two
registers: the Accumulator (ACC) and the Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDM
#n
Immediate addressing. Load the number n to the ACC
AND
#n / Bn / &n
Bitwise AND operation of the contents of the ACC with the operand
AND
<address>
Bitwise AND operation of the contents of the ACC with the contents of
<address>
XOR
#n / Bn / &n
Bitwise XOR operation of the contents of the ACC with the operand
XOR
<address>
Bitwise XOR operation of the contents of the ACC with the contents of
<address>
OR
#n / Bn / &n
Bitwise OR operation of the contents of the ACC with the operand
OR
<address>
Bitwise OR operation of the contents of the ACC with the contents of
<address>
CMP
#n
Compare the contents of the ACC with number n
CMP
<address>
Compare the contents of the ACC with the contents of <address>
LSL
#n
Bits in the ACC are shifted logically n places to the left. Zeros are
introduced on the right‑hand end
LSR
#n
Bits in the ACC are shifted logically n places to the right. Zeros are
introduced on the left‑hand end
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #127
B denotes a binary number, e.g. B10010001
& denotes a hexadecimal number, e.g. &4A
The current contents of main memory are shown:
Address
Data
0000 0011
100
1010 1110
101
1100 1100
102
1111 1111
103
1100 1100
104
ĬÑĊ®Ġ´íÈõÏĪÅĊÞù·þ×
,
,
(a) Complete the table by writing the contents of the ACC after the execution of each instruction.
Current contents of the
Contents of the ACC after the
Instruction
ACC
execution of the instruction
0000 1111
AND 101
0000 0000
LDM #100
0000 0001
XOR &F1
0001 0001
CMP 101
[4]
(b) The Von Neumann model for a computer system uses registers.
Describe the role of the Memory Address Register (MAR) and Memory Data Register (MDR)
in the fetch‑execute (F‑E) cycle.
…
…
…
…
…
…
…
… [4]
(c) Assembly language instructions are grouped.
Complete each statement by writing the name of the appropriate instruction group.
Loading data into the accumulator is an example of an instruction in the
… group. Incrementing the index register is an example
of an instruction in the … group. Branching to another
address is an example of an instruction in the … group.
[3]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞû·þ×

5
9618/11/O/N/24 · Question 8Oct/Nov 2024Paper 114 marks
Loading question…
Question text

8
A computer designed using the Von Neumann model for a computer system contains general
purpose registers and special purpose registers.
(a) Describe the purpose of the Status Register (SR).
…
…
…
… [2]
(b) Identify two differences between general purpose registers and special purpose registers.
1 …
…
…
2 …
…
…
[2]
ĬÍĊ®Ġ´íÈõÏĪÅĊßùµĂ×
,
,
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
ĬÍĊ®Ġ´íÈõÏĪÅĊÝùµĄ×

6
9618/12/O/N/24 · Question 3Oct/Nov 2024Paper 1212 marks
Loading question…
Question text

3
A student has a computer.
(a) The computer is designed using the Von Neumann model for a computer system.
Complete the table by describing the purpose of each of the given registers.
Register
Purpose
…
Program Counter
(PC)
…
…
…
Memory Address
Register (MAR)
…
…
…
Memory Data
Register (MDR)
…
…
…
Index Register (IX)
…
…
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊßû¸Ā×
,
,
(b) The student needs to connect the computer to a monitor that has a screen resolution of
2560 × 1600 pixels. The monitor also has built-in speakers.
The computer has a Video Graphics Array (VGA) port and a High Definition Multimedia
Interface (HDMI) port.
Explain the benefits of connecting the monitor to the computer using the HDMI port instead of
the VGA port.
…
…
…
…
…
…
…
… [4]
(c) The computer has an Operating System (OS). One of the key management tasks of the OS is
process management.
Describe the process management tasks performed by an OS.
…
…
…
…
…

7
9618/12/O/N/24 · Question 8Oct/Nov 2024Paper 1211 marks
Loading question…
Question text

8
The following table shows part of the instruction set for a processor. The processor has two
registers, the Accumulator (ACC) and the Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDM
#n
Immediate addressing. Load the number n to ACC
LDD
<address>
Direct addressing. Load the contents of the location at the
given address to ACC
LDI
<address>
Indirect addressing. The address to be used is at the given
address.
Load the contents of this second address to ACC
LDX
<address>
Indexed addressing. Form the address from <address> + the
contents of the index register. Copy the contents of this
calculated address to ACC
LDR
#n
Immediate addressing. Load the number n to IX
ADD
#n/Bn/&n
Add the number n to the ACC
ADD
<address>
Add the contents of the given address to the ACC
SUB
#n/Bn/&n
Subtract the number n from the ACC
SUB
<address>
Subtract the contents of the given address from the ACC
INC
<register>
Add 1 to the contents of the register (ACC or IX)
DEC
<register>
Subtract 1 from the contents of the register (ACC or IX)
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001010
& denotes a hexadecimal number, e.g. &4A
ĬÑĊ®Ġ´íÈõÏĪÅĊßù·Ā×
,
,
(a) The current contents of memory are shown:
Address
Data
19
25
20
23
21
2
22
4
23
15
24
50
25
22
The current contents of the ACC and IX are shown:
50
ACC
20
IX
Complete the table by writing the content of the ACC and the IX after each set of instructions
has run.
Instructions
ACC content
IX content
LDM #19
1
DEC ACC
LDD 23
2
ADD 19
LDI 25
3
INC ACC
LDR #21
4
LDX 2
[5]
ĬÓĊ®Ġ´íÈõÏĪÅĊßû·Ā×
,
,
(b) The instruction set also includes these bit manipulation instructions:
Instruction
Explanation
Opcode
Operand
AND
#n/Bn/&n
Bitwise AND operation of the contents of ACC with the operand
Bitwise AND operation of the contents of ACC with the
AND
<address>
contents of <address>
XOR
#n/Bn/&n
Bitwise XOR operation of the contents of ACC with the operand
Bitwise XOR operation of the contents of ACC with the
XOR
<address>
contents of <address>
OR
#n/Bn/&n
Bitwise OR operation of the contents of ACC with the operand
Bitwise OR operation of the contents of ACC with the
OR
<address>
contents of <address>
Bits in ACC are shifted logically n places to the left. Zeros
LSL
#n
are introduced on the right-hand end
Bits in ACC are shifted logically n places to the right. Zeros
LSR
#n
are introduced on the left-hand end.
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001010
& denotes a hexadecimal number, e.g. &4A
The current content of the ACC is shown:
ACC
1
0
0
1
1
0
1
0
(i)
The table has three sets of instructions. The binary number 10011010 is reloaded into
the ACC before each set of instructions is run.
Complete the table by writing the content of the ACC after each set of instructions has run.
Instructions
ACC content
LSL #2
1
ADD #5
2
AND #30
OR B11110010
3
INC ACC
[3]
ĬÍĊ®Ġ´íÈõÏĪÅĊàü¶Ă×
,
,
(ii)
Explain how bit manipulation can be used to test whether the binary number stored in
the ACC represents an odd denary number.
Write the bit manipulation instruction that will be used.
Explanation …
…
…
…
…
Instruction …

8
9618/13/O/N/24 · Question 7Oct/Nov 2024Paper 136 marks
Loading question…
Question text

7
The following table shows part of the instruction set for a processor. The processor has two
registers, the Accumulator (ACC) and the Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDM
#n
Immediate addressing. Load the number n to ACC
Direct addressing. Load the contents of the location at the given
LDD
<address>
address to ACC
Indirect addressing. The address to be used is at the given
LDI
<address>
address.
Load the contents of this second address to ACC
Indexed addressing. Form the address from <address> + the
LDX
<address>
contents of the index register. Copy the contents of this calculated
address to ACC
LDR
#n
Immediate addressing. Load the number n to IX
ADD
#n/Bn/&n
Add the number n to the ACC
ADD
<address>
Add the contents of the given address to the ACC
SUB
#n/Bn/&n
Subtract the number n from the ACC
SUB
<address>
Subtract the contents of the given address from the ACC
INC
<register>
Add 1 to the contents of the register (ACC or IX)
DEC
<register>
Subtract 1 from the contents of the register (ACC or IX)
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001010
& denotes a hexadecimal number, e.g. &4A
ĬÙĊ®Ġ´íÈõÏĪÅĊàû·Ā×
,
,
(a) The current contents of memory are shown:
Address
Data
54
50
55
51
50
52
52
53
100
54
25
55
50
56
The current contents of the ACC and IX are shown:
50
ACC
45
IX
Complete the table by writing the content of the ACC after each program has run.
Instructions
ACC content
LDD 50
ADD #4
1
ADD 54
LDI 53
DEC ACC
2
ADD 56
LDM #55
3
SUB #5
[3]
ĬÛĊ®Ġ´íÈõÏĪÅĊàù·Ā×
,
,
(b) The instruction set also includes these bit manipulation instructions:
Instruction
Explanation
Opcode
Operand
AND
#n/Bn/&n
Bitwise AND operation of the contents of ACC with the operand
Bitwise AND operation of the contents of ACC with the contents
AND
<address>
of <address>
XOR
#n/Bn/&n
Bitwise XOR operation of the contents of ACC with the operand
Bitwise XOR operation of the contents of ACC with the contents
XOR
<address>
of <address>
OR
#n/Bn/&n
Bitwise OR operation of the contents of ACC with the operand
Bitwise OR operation of the contents of ACC with the contents of
OR
<address>
<address>
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001010
& denotes a hexadecimal number, e.g. &4A
Explain how bit manipulation can be used to clear the data in an 8-bit register.
Write the bit manipulation instruction that will be used.
Explanation …
…
…
…
…
Instruction …
[3]
ĬÕĊ®Ġ´íÈõÏĪÅĊßú¶Ă×

Advertisement
9
9618/11/O/N/23 · Question 5Oct/Nov 2023Paper 1112 marks
Loading question…
Question text

5
The Central Processing Unit (CPU) of the basic Von Neumann model for a computer system
contains several special purpose registers.
(a) The Memory Data Register (MDR), Index Register (IX) and the Accumulator (ACC) are
examples of special purpose registers.
Identify two other special purpose registers and state their role in the CPU.
Special purpose register 1 …
Role …
…
…
Special purpose register 2 …
Role …
…
…
[4]
(b) Describe what is meant by the Immediate Access Store (IAS) in a computer system.
…
…
…
… [2]
(c) A computer has a single 2.1 GHz CPU.
(i)
Describe how increasing the clock speed to 4 GHz can increase the performance of the
computer.
…
…
… [1]
(ii)
A second computer has a CPU with two 2.1 GHz cores.
Explain why the second computer does not always run twice as fast as the computer
with one 2.1 GHz CPU.
…
…
…
…
…
…
…
…

10
9618/11/O/N/23 · Question 8Oct/Nov 2023Paper 1110 marks
Loading question…
Question text

8
(a) Identify the purpose of the first pass of a two-pass assembler.
…
… [1]
(b) The following table shows part of the instruction set for a processor. The processor has two
registers, the Accumulator (ACC) and the Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDR
#n
Immediate addressing. Load the number n to IX
STO
<address>
Store contents of ACC at the given address
ADD
<address>
Add the contents of the given address to the ACC
INC
<register>
Add 1 to the contents of the register (ACC or IX)
CMP
#n
Compare the contents of ACC with number n
JPE
<address>
Following a compare instruction, jump to <address> if the compare was True
OUT
Output to the screen the character whose ASCII value is stored in ACC
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #123
(i)
Give one example of an instruction that belongs to each of the following instruction
groups.
Only use the instructions given in the table. Each instruction must have a suitable
operand.
Data movement …
Arithmetic operation …
Conditional instruction …
[3]
(ii)
The instruction LDR #2 uses immediate addressing.
Give one similarity and one difference between direct addressing and indexed addressing.
Similarity …
…
…
Difference …
…
…
[2]
(iii)
Identify one other mode of addressing.
…
… [1]
(c) The following table shows another part of the instruction set for the same processor.
Instruction
Explanation
Opcode
Operand
AND
Bn
Bitwise AND operation of the contents of ACC with the operand
XOR
Bn
Bitwise XOR operation of the contents of ACC with the operand
LSR
#n
Bits in ACC are shifted logically n places to the right. Zeros are introduced on
the left hand end
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001101
(i)
The current contents of the ACC are:
1
0
0
1
1
1
1
0
Show the contents of the ACC after the execution of the following instruction.
AND B10100101
…
…
[1]
(ii)
The current contents of the ACC are:
0
0
0
1
0
1
1
1
Show the contents of the ACC after the execution of t

11
9618/12/O/N/23 · Question 9Oct/Nov 2023Paper 128 marks
Loading question…
Question text

9
The following table shows part of the instruction set for a processor. The processor has two
registers, the Accumulator (ACC) and the Index Register (IX).
Instruction
Explanation
Opcode
Operand
Direct addressing. Load the contents of the location at the given
LDD
<address>
address to ACC
Indexed addressing. Form the address from <address> +
the contents of the index register. Copy the contents of this
LDX
<address>
calculated address to ACC
LDR
#n
Immediate addressing. Load the number n to IX
STO
<address>
Store the contents of ACC at the given address
ADD
#n
Add the denary number n to the ACC
JMP
<address>
Jump to the given address
INC
<register>
Add 1 to the contents of the register (ACC or IX)
CMP
<address>
Compare the contents of ACC with the contents of <address>
Indirect addressing. The address to be used is at the given
CMI
<address>
address. Compare the contents of ACC with the contents of this
second address
Following a compare instruction, jump to <address> if the
JPE
<address>
compare was True
IN
Key in a character and store its ASCII value in ACC
Output to the screen the character whose ASCII value is stored
OUT
in ACC
END
Return control to the operating system
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
(a) The instructions in the processor’s instruction set can be grouped according to their function.
Identify the instruction group for each of the following opcodes.
IN …
ADD …
JPE …
CMI …
[4]
(b) The current contents of main memory and selected values from the ASCII character set are
given on page 15.
Trace the program currently in memory using the trace table when the input is ‘1’.
Address
Instruction
Memory address
Output
Instruction
ACC
IX
address
LDR #0
10
100
101
110
111
0
0
51
65
IN
11
STO 101
12
LDX 110
13
CMP 100
14
JPE 21
15
LDD 101
16
ADD #16
17
INC IX
18
STO 100
19
JMP 13
20
OUT
21
END
22
...
0
100
0
101
...
51
110
65
111
ASCII
Character
value
49
1
50
2
51
3
[4]
52
4
...
65
A
66
B
67
C
68
D
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge

12
9618/13/O/N/23 · Question 9Oct/Nov 2023Paper 1313 marks
Loading question…
Question text

9
A computer system is designed using the basic Von Neumann model.
Registers and buses are components in the Von Neumann model.
(a) (i)
Identify three other components in the Von Neumann model of a computer system.
Do not include registers or buses in your answers.
1 …
2 …
3 …
[3]
(ii)
Identify two differences between special purpose registers and general purpose
registers.
1 …
…
2 …
…
[2]
(b) The following incomplete table contains steps of the Fetch‑Execute (F‑E) cycle and their
descriptions.
Complete the table by writing the missing steps using register transfer notation and the
missing descriptions.
Step
Description
…
The address in PC is incremented.
…
MDR
[[MAR]]
…
…
…
[PC]
MAR
…
…
…
The contents of MDR are copied into CIR.
[4]
(c) Interrupts can be caused by software programs or hardware devices.
State one cause of a software interrupt.
…
… [1]
(d) The following statements describe the stages that the CPU performs when an interrupt is
detected.
There are three missing statements.
Write the letter of the missing statements from the table in the correct place to complete the
description.
1 At the end of each Fetch‑Execute (F‑E) cycle, the processor checks if an interrupt flag is
set.
2
…
3 If the interrupt priority is high enough, the processor saves the current contents of the
registers.
4
…
5
When servicing of the interrupt is complete, the processor restores the registers.
6
…
Letter
Stage
The address of the Interrupt Service (ISR) handling routine is loaded into the
A
Program Counter (PC).
B
Lower priority interrupts are re‑enabled.
C
The device causing the interrupt transfers data to the CPU.
The processor identifies the source of the interrupt and checks the priority of
D
the interrupt.
E
The ISR is incremented.
[3]
Permission to reproduce items where third‑party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be please

13
9618/11/O/N/22 · Question 5Oct/Nov 2022Paper 1111 marks
Loading question…
Question text

5
(a) State what is meant by the stored program concept in the Von Neumann model of a
computer system.
…
… [1]
(b) A Central Processing Unit (CPU) contains several special purpose registers and other
components.
(i)
State the role of the following registers.
Program Counter (PC) …
…
…
Index Register (IX) …
…
…
Status Register (SR) …
…
…
[3]
(ii)
Tick (  ) one box in each row to identify the system bus used by each CPU component.
CPU component
Data bus
Address bus
Control bus
System clock
Memory Address Register (MAR)
[1]
(iii)
Describe the purpose of the Control Unit (CU) in a CPU.
…
…
…
… [2]
(c) Describe the purpose of an interrupt in a computer system.
…
…
…
… [2]
(d) Identify two causes of a software interrupt.
1 …
…
2 …
…
[2]

Advertisement
14
9618/11/O/N/22 · Question 6Oct/Nov 2022Paper 1111 marks
Loading question…
Question text

6
The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDM
#n
Immediate addressing. Load the number n to ACC
LDD
<address>
Direct addressing. Load the contents of the location at the given
address to ACC
LDX
<address>
Indexed addressing. Form the address from <address> + the
contents of the index register. Copy the contents of this calculated
address to ACC
LDR
#n
Immediate addressing. Load the number n to IX
STO
<address>
Store contents of ACC at the given address
ADD
<address>
Add the contents of the given address to the ACC
ADD
#n
Add the denary number n to the ACC
INC
<register>
Add 1 to the contents of the register (ACC or IX)
CMP
#n
Compare the contents of ACC with number n
JPE
<address>
Following a compare instruction, jump to <address> if the
compare was True
JPN
<address>
Following a compare instruction, jump to <address> if the
compare was False
OUT
Output to the screen the character whose ASCII value is stored in
ACC
END
Return control to the operating system
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001101
(a) The current contents of main memory and selected values from the ASCII character set are
given.
(i)
Trace the program currently in memory using the trace table.
Memory address
Instruction
ACC
IX
Output
address
Address
Instruction
100
101
110
111
112
77
LDR
#0
0
0
66
65
35
78
LDX
110
79
CMP
#35
80
JPE
92
81
ADD
100
82
STO
101
83
LDM
#1
84
ADD
100
85
STO
100
86
INC
IX
87
LDX
110
88
CMP
#35
89
JPN
81
90
LDD
100
91
ADD
#48
92
OUT
93
END
…
100
0
101
0
…
110
66
111
65
112
35
ASCII
Character
value
49
1
50
2
51
3
52
4
65
A
66
B
67
C
68
D
[4]
(ii)
The following instructions are repeated for your reference.
Instruction
Explanation
Opcode
Operand
LDD
<address>
Direct addressing. Load the contents of the location at the given
address to ACC
STO
<address>
Store contents of ACC at the given address
State the purpose of this part of an assembly language program.
LDD
100
STO
165
LDD
101
STO
100
LDD
165
STO
101
…
…
[1]
Question 6(b) begins on page 16.
(b) The following table shows another part of the instruction set for the processor.
Instruction
Explanation
Opcode
Operand
AND
#n
Bitwise AND operation of the contents of ACC with the operand
AND
Bn
Bitwise AND operation of the contents of ACC with the binary number n
XOR
#n
Bitwise XOR operation of the contents of ACC with the operand
XOR
Bn
Bitwise XOR operation of the contents of ACC with the binary number n
OR
#n
Bitwise OR operation of the contents of ACC with the operand
OR
Bn
Bitwise OR operation of the contents of ACC with the binary number n
LSR
#n
Bits in ACC are shifted logically n places to the right. Zeros are
introduced on the left-hand end
<address> can be an absolute or a symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001101
(i)
The current contents of the ACC are:
1
0
0
1
0
0
1
1
Show the result after the execution of the following instruction.
XOR B00011111
…
…
[1]
(ii)
The current contents of the ACC are:
1
0
0
1
0
0
1
1
Show the result after the execution of the following instruction.
AND B11110000
…

15
9618/12/O/N/22 · Question 7Oct/Nov 2022Paper 1212 marks
Loading question…
Question text

7
The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDM
#n
Immediate addressing. Load the number n to ACC
LDD
<address>
Direct addressing. Load the contents of the location at the given address to
ACC
LDX
<address>
Indexed addressing. Form the address from <address> + the contents of the
index register. Copy the contents of this calculated address to ACC
LDR
#n
Immediate addressing. Load the number n to IX
STO
<address>
Store the contents of ACC at the given address
ADD
<address>
Add the contents of the given address to the ACC
ADD
#n
Add the denary number n to the ACC
INC
<register>
Add 1 to the contents of the register (ACC or IX)
JMP
<address>
Jump to the given address
CMP
<address>
Compare the contents of ACC with the contents of <address>
CMI
<address>
Indirect addressing. The address to be used is at the given address. Compare
the contents of ACC with the contents of this second address
JPE
<address>
Following a compare instruction, jump to <address> if the compare was True
JPN
<address>
Following a compare instruction, jump to <address> if the compare was False
END
Return control to the operating system
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001101
(a) Trace the program currently in memory using the trace table, stopping when line 90 is
executed for a second time.
Memory address
Address
Instruction
Instruction
ACC
IX
address
100
101
102
103
110
111
112
LDR #0
75
0
0
112
4
1
4
0
LDX 110
76
CMI 102
77
JPE 91
78
CMP 103
79
JPN 84
80
ADD 101
81
STO 101
82
JMP 86
83
INC ACC
84
STO 101
85
LDD 100
86
INC ACC
87
STO 100
88
INC IX
89
JMP 76
90
END
91
…
0
100
0
101
112
102
4
103
…
1
110
4
111
0
112
[5]
(b) The following table shows another part of the instruction set for the processor.
Instruction
Explanation
Opcode
Operand
AND
#n
Bitwise AND operation of the contents of ACC with the operand
AND
<address>
Bitwise AND operation of the contents of ACC with the contents of <address>
XOR
#n
Bitwise XOR operation of the contents of ACC with the operand
XOR
Bn
Bitwise XOR operation of the contents of ACC with the binary number n
XOR
<address>
Bitwise XOR operation of the contents of ACC with the contents of <address>
OR
#n
Bitwise OR operation of the contents of ACC with the operand
Bitwise OR operation of the contents of ACC with the contents of <address>
OR
<address>
Bits in ACC are shifted logically n places to the left. Zeros are introduced on
LSL
#n
the right-hand end
Bits in ACC are shifted logically n places to the right. Zeros are introduced on
LSR
#n
the left-hand end
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001101
The contents of memory addresses 50 and 51 are shown:
Memory address
Data value
50
01001101
51
10001111
(i)
The current contents of the ACC are:
0
1
0
1
0
0
1
1
Show the contents of the ACC after the execution of the following instruction.
XOR B00011111
…
…
[1]
(ii)
The current contents of the ACC are:
0
1
0
1
0
0
1
1
Show the contents of the ACC after the execution of the following instruction.
AND 50
…
…
[1]
(iii)
The current contents of the ACC are:
0
1
0
1
0
0
1
1
Show the contents of the ACC after th

Advertisement