Processor fundamentals and assembly language – A Level Computer Science (9618)
40 questions · page 1 of 3 · Clear filters
Question text
3
The following table shows part of the instruction set for a processor. The processor has two
registers: the Accumulator (ACC) and an 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
LDD
<address>
given address to ACC
INC
<register>
Add 1 to the contents of the register (ACC or IX)
STO
<address>
Store the contents of ACC at the given address
ADD
#n / Bn / &n
Add the number n to the ACC
ADD
<address>
Add the contents of the given address to the ACC
DEC
<register>
Subtract 1 from the contents of the register (ACC or IX)
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. B01001010
& denotes a hexadecimal number, e.g. &4A
The current contents of memory are:
address
data
200
100
205
101
100
102
50
103
…
101
200
100
201
20
202
13
203
220
204
30
205
© Cambridge University Press & Assessment 2026
,
,
(a) Complete the table to identify the data that will be stored in the accumulator after each set of
instructions has been executed.
accumulator current data
set of instructions
new accumulator data
ADD B00000010
B11001010
INC ACC
LDM #200
#100
ADD 200
LDD 103
#103
DEC ACC
DEC ACC
[3]
© Cambridge University Press & Assessment 2026
,
,
(b) The instruction set also contains the following instructions:
instruction
explanation
opcode
operand
Bitwise AND operation of the contents of ACC with
AND
#n / Bn / &n
the operand
Bitwise AND operation of the contents of ACC with the
AND
<address>
contents of <address>
Bitwise XOR operation of the contents of ACC with
XOR
#n / Bn / &n
the operand
Bitwise XOR operation of the contents of ACC with the
XOR
<address>
contents of <address>
Bitwise OR operation of the contents of ACC with
OR
#n / Bn / &n
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.
LSR
#n
Zeros are introduced on the left hand end
Bits in ACC are shifted n places to the left using a
CSL
#n
cyclic shift
Bits in ACC are shifted n places to the right using a
CSR
#n
cyclic shift
Bits in ACC are shifted n places to the left using an
ASL
#n
arithmetic shift
Bits in ACC are shifted n places to the right using an
ASR
#n
arithmetic shift
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001010
& denotes a hexadecimal number, e.g. &4A
(i)
Write the bit manipulation instruction that will set the ACC to &0
… [2]
© Cambridge University Press & Assessment 2026
,
,
(ii)
The ACC currently contains the following binary value.
0
0
1
1
0
1
0
1
Write the result after the instruction LSR #3 is run.
[1]
(c) Immediate, relative and direct are three modes of addressing used in assembly
language programming.
Identify and describe one additional mode of addressing used in assembly
language programming.
Include an example of an instruction that uses your selected mode of addressing in
your answer.
mode of addressing …
description with example …
…
…
Question text
7
A program is written in assembly language.
(a) Complete the table by writing the name of each mode of addressing.
mode of addressing
description
The operand is an address where the data is stored.
The operand is an address that stores the address where
the data is stored.
The operand is an address. The address where the data is
stored is calculated by adding the operand to the content of
the index register.
The operand is the data to be used.
[4]
(b) Explain how bit manipulation can be used to monitor or control a device.
…
…
…
…
…
… [3]
(c) Identify one similarity and one difference between a right logical shift and a right
arithmetic shift.
similarity …
…
difference …
…
[2]
© Cambridge University Press & Assessment 2026
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]
ĬÓĊ®Ġ´íÈõÏĪÅĊßû¶Ā×
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]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞû¸þ×
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]
ĬÏĊ®Ġ´íÈõÏĪÅĊßü·Ā×
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]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞû·þ×
Question text
8
(a) The following table shows part of the instruction set for a processor. The processor has two
registers: the Accumulator (ACC) and an 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
INC
<register>
Add 1 to the contents of the register (ACC or IX)
STO
<address>
Store the contents of ACC at the given address
ADD
#n/Bn/&n
Add the number n to the ACC
DEC
<register>
Subtract 1 from 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>
Following a compare instruction, jump to <address> if the
JPE
<address>
compare was True
END
Return control to the operating system
ACC denotes Accumulator
<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 contents of memory are:
address
Instruction
80
10
8
81
80
82
83
81
...
LDD 81
200
INC ACC
201
STO 83
202
LDI 82
203
CMP 83
204
205
JPE 209
206
LDD 83
207
ADD #10
208
JMP 210
209
DEC ACC
210
STO 81
211
END
Trace the program currently in memory using the following trace table.
Memory address
Instruction address
ACC
80
81
82
83
10
8
80
81
[4]
Ĭ×Ċ®Ġ´íÈõÏĪÅĊÞü¶Ă×
,
,
(b) The table shows part of the instruction set for a processor. The processor has one register:
the Accumulator (ACC).
Instruction
Explanation
Opcode
Operand
Bitwise AND operation of the contents of ACC with the
AND
#n/Bn/&n
operand
Bitwise AND operation of the contents of ACC with the
AND
<address>
contents of <address>
Bitwise XOR operation of the contents of ACC with the
XOR
#n/Bn/&n
operand
Bitwise XOR operation of the contents of ACC with the
XOR
<address>
contents of <address>
Bitwise OR operation of the contents of ACC with the
OR
#n/Bn/&n
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.
LSL
#n
Zeros are introduced on the right‑hand end
Bits in ACC are shifted logically n places to the right.
LSR
#n
Zeros are introduced on 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. B01001010
& denotes a hexadecimal number, e.g. &4A
ĬÕĊ®Ġ´íÈõÏĪÅĊàú¶Ą×
,
,
(i)
Write the bit manipulation instruction that can be used to set the least significant bit to 1
in an 8‑bit register. All other bits must remain unchanged.
The instruction needs to work on a register that contains any 8‑bit binary number.
… [1]
(ii)
The ACC currently contains the following binary value.
0
1
0
1
0
1
0
1
Write the result after the instruction XOR &FE is run.
[1]
(iii)
The ACC currently contains the following binary value.
0
1
1
0
1
0
1
1
Write the result after the instruction LSR #5 is run.
[1]
Ĭ×Ċ®Ġ´íÈõÏĪÅĊàü¶Ą×
,
,
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 i
Question text
1
(a) The table has six statements about the Von Neumann model for a computer system.
Three of the statements are incorrect.
Statement number
Statement
The Program Counter (PC) stores the next instruction to be fetched from
1
memory.
The Arithmetic and Logic Unit (ALU) performs mathematical and logical
2
operations.
3
The Control Unit (CU) sends signals to other components on the data bus.
The Memory Data Register (MDR) transfers data to the memory address
4
stored in the Memory Address Register (MAR).
5
The MAR stores an address from memory.
6
The Accumulator (ACC) stores the result of calculations.
Complete the table by writing the three incorrect statement numbers and the corrected
statements.
Incorrect
Corrected statement
statement number
…
…
…
…
…
…
…
…
…
…
…
…
[3]
ĬÍĊ®Ġ´íÈõÏĪÅĊÝü¸þ×
,
,
(b) Registers that are used in the Fetch-Execute (F-E) cycle include the PC, MAR, MDR and the
ACC.
Identify one other register and describe its role in the Fetch-Execute (F-E) cycle.
Register …
Role …
…
[2]
(c) Explain how an interrupt from an input device will be detected and handled in the F-E cycle.
…
…
…
…
…
…
…
… [4]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝú¸þ×
Question text
7
(a) The following table shows part of the instruction set for a processor. The processor has one
register: the Accumulator (ACC).
Instruction
Explanation
Opcode
Operand
Direct addressing. Load the contents of the location at the given
LDD
<address>
address to ACC
LDM
#n
Immediate addressing. Load the number n to ACC
STO
<address>
Store the contents of ACC at the given address
ADD
#n/Bn/&n
Add the number n to the ACC
ADD
<address>
Add the contents of the given address to the ACC
INC
<register>
Add 1 to the contents of the register (ACC)
CMP
<address>
Compare the contents of ACC with the contents of <address>
CMP
#n
Compare the contents of ACC with number n
Following a compare instruction, jump to <address> if the compare
JPE
<address>
was True
JMP
<address>
Jump to the given address
END
Return control to the operating system
ACC denotes Accumulator
<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 contents of memory are:
Address
Instruction
12
10
11
11
10
12
22
13
22
14
…
LDD 10
100
ADD 12
101
STO 11
102
CMP 14
103
JPE 107
104
INC ACC
105
JMP 101
106
STO 10
107
END
108
ĬÍĊ®Ġ´íÈõÏĪÅĊàû¶Ă×
,
,
(i)
Trace the program currently in memory using the following trace table.
Memory address
Instruction address
ACC
10
11
12
13
14
12
11
10
22
22
[3]
(ii)
State the effect of changing instruction LDD 10 in address 100 to LDM #10
…
…
… [1]
(iii)
Identify and describe one mode of addressing not given in the table of instructions in
part (a).
Mode of addressing …
Description …
…
…
[2]
ĬÏĊ®Ġ´íÈõÏĪÅĊàù¶Ă×
,
,
(b) 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 ACC with the operand
AND
<address>
Bitwise AND operation of the contents of ACC with the contents of
<address>
XOR
#n/Bn/&n
Bitwise XOR operation of the contents of ACC with the operand
XOR
<address>
Bitwise XOR operation of the contents of ACC with the contents of
<address>
OR
#n/Bn/&n
Bitwise OR operation of the contents of ACC with the operand
OR
<address>
Bitwise OR operation of the contents of ACC with the contents of
<address>
<address> can be an absolute or symbolic address
# denotes a denary number, e.g. #123
B denotes a binary number, e.g. B01001010
& denotes a hexadecimal number, e.g. &4A
(i)
The ACC currently contains the following binary value.
1
1
1
1
0
0
0
0
Write the result after the instruction OR B00001111 is run.
[1]
(ii)
The ACC currently contains the following binary value.
0
0
0
1
1
1
0
1
Write the result after the instruction XOR #30 is run.
[1]
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 copyr
Question text
2
A computer has a processor.
(a) The processor has a Control Unit (CU) and system clock.
(i)
Explain how the CU and the system clock work together.
…
…
…
… [2]
(ii)
The processor runs the Fetch-Execute (F-E) cycle.
Write the stages of the F-E cycle using register transfer notation.
…
…
…
…
…
… [4]
(b) The computer has cache memory.
Describe one benefit of the computer using cache memory.
…
…
…
… [2]
(c) The computer connects to a monitor using a High Definition Multimedia Interface (HDMI)
cable that connects into an HDMI port.
Explain how HDMI provides connection to peripheral devices.
…
…
…
… [2]
ĬÕĊ®Ġ´íÈõÏĪÅĊàù¸Ā×
Question text
5
The following table shows part of the instruction set for a processor. The processor has two
registers: the Accumulator (ACC) and an Index Register (IX).
Instruction
Explanation
Opcode
Operand
LDM #n
Immediate addressing. Load the number n to ACC
STO <address>
Store the contents of ACC at the given address
ADD #n/Bn/&n
Add the number n to the ACC
ADD <address>
Add the contents of the given address to the ACC
SUB <address>
Subtract the contents of the given address from the ACC
SUB #n/Bn/&n
Subtract the number n from the ACC
DEC <register>
Subtract 1 from 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>
CMP #n
Compare the contents of ACC with number n
Following a compare instruction, jump to <address> if the compare
JPE <address>
was True
END
Return control to the operating system
ACC denotes Accumulator
<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:
Address
Instruction
50
47
48
51
49
52
53
50
...
LDM #50
500
DEC ACC
501
CMP 51
502
JPE 505
503
JMP 501
504
505
STO 50
506
SUB #10
507
STO 51
508
END
ĬÙĊ®Ġ´íÈõÏĪÅĊÞû·þ×
,
,
(i)
Trace the program currently in memory using the following trace table.
Memory address
Instruction address
ACC
50
51
52
53
47
48
49
50
[3]
ĬÛĊ®Ġ´íÈõÏĪÅĊÞù·þ×
,
,
(ii)
Complete the table by identifying and describing two modes of addressing that are not
used in the program in part (a).
Mode of addressing
Description
…
…
…
…
…
…
…
…
…
…
…
…
[4]
ĬÙĊ®Ġ´íÈõÏĪÅĊàû·Ā×
,
,
(b) 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 ACC with the operand
Bitwise AND operation of the contents of ACC with the contents of
AND
<address>
<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 of
XOR
<address>
<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
Write the bit manipulation instructions that can be used to set only the most significant bit to
1 in an 8-bit register.
The instructions need to work on a register that contains any 8-bit binary number.
…
… [2]
ĬÛĊ®Ġ´íÈõÏĪÅĊàù·Ā×
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
ĬÍĊ®Ġ´íÈõÏĪÅĊÝùµĄ×
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.
…
…
…
…
…
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 …
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]
ĬÕĊ®Ġ´íÈõÏĪÅĊßú¶Ă×