Processor fundamentals and assembly language – A Level Computer Science (old syllabus, to 2021) (9608)

10 questions

0 / 0Answer a question to start your score.
New quizSaved 0

Quick quiz: 10 random questions from this topic. Answer them all, then open the Summary.

Advertisement
1
9608/13/M/J/18 · Question 3May/June 2018Paper 1312 marks
Loading question…
Question text

3
A computer is designed using the Von Neumann model.
(a) Describe the role of the Arithmetic and Logic Unit (ALU) and Control Unit (CU) in the Von
Neumann model.
ALU …
…
…
…
CU …
…
…
…
[4]
(b) Describe the role of the Status Register and Program Counter (PC).
Status Register …
…
…
…
PC …
…
…
…
[4]
(c) H is a register. The current contents of H are:
1
1
0
0
0
0
0
1
The current contents of register H represent an unsigned binary integer.
(i)
Convert the value in register H into denary.
… [1]
(ii)
Convert the value in register H into hexadecimal.
… [1]
(iii)
The current contents of register H represent a two’s complement binary integer.
Convert the value in register H into denary.
… [1]
(iv)
State why register H does not currently contain a Binary Coded Decimal (BCD).
…
… [1]

2
9608/11/O/N/17 · Question 2Oct/Nov 2017Paper 117 marks
Loading question…
Question text

2
(a) The diagram shows three items of software that translate program code.
Draw one line from each context to the correct item of translation software.
Item of translation software
Context
A web page contains a client-side script.
Assembler
Each instruction in the source code
consists of an op code and an operand.
Interpreter
The source code is required at run-time.
Compiler
When the source code is translated,
copies of the executable program can be
distributed without the need for the source
code.
[4]
(b) The Java programming language is said to be machine or platform independent.
(i)
Describe what is meant by machine independent.
…
… [1]
(ii)
Describe how a Java source code program is translated.
…
…
…
… [2]

3
9608/13/O/N/19 · Question 7Oct/Nov 2019Paper 135 marks
Loading question…
Question text

7
The following table has descriptions of modes of addressing.
Complete the table by writing the name of the addressing mode for each description.
Addressing mode
Description
Form the address by adding the given number to a base address. Load
the contents of the calculated address to the Accumulator (ACC).
Load the contents of the address held at the given address to ACC.
Load the contents of the given address to ACC.
Form the address from the given address + the contents of the Index
Register. Load the contents of the calculated address to ACC.
Load the given value directly to ACC.
[5]
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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of

Advertisement
4
9608/11/O/N/17 · Question 4Oct/Nov 2017Paper 1117 marks
Loading question…
Question text

4
(a) The diagram shows the components and buses found inside a typical Personal Computer
(PC).
General purpose
registers
A
D
Arithmetic Logic
E
F
Unit (ALU)
B
C
Some components and buses only have labels A to F to identify them.
For each label, choose the appropriate title from the following list. The title for label D is
already given.
•
Control bus
•
System clock
•
Data bus
•
Control unit
•
Main memory
•
Secondary storage
A
…
B
…
C
…
D
Address bus
E
…
F
…
[5]
(b) 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
Op code
Op code
Operand
(mnemonic)
(binary)
Immediate addressing. Load number n to ACC.
LDM
#n
1100 0001
Direct addressing. Load the contents of the given
LDD
<address>
1100 0010
address to ACC.
Relative addressing. Move to the address n locations
from the address of the current instruction. Load the
LDV
#n
1100 0011
contents of this address to ACC.
Store the contents of ACC at the given address.
STO
<address>
1100 0100
Decrement the contents of ACC.
DEC
1100 0101
Output the character corresponding to the ASCII
OUTCH
1100 0111
character code in ACC.
Following a compare instruction, jump to <address> if
JNE
<address>
1110 0110
the compare was False.
JMP
<address>
1110 0011
(Unconditionally) jump to the given address.
CMP
#n
1110 0100
Compare the contents of ACC with number n.
Complete the trace table for the following assembly language program.
Label
Instruction
StartProg:
LDV
#CountDown
CMP
Num1
ASCII code table (selected codes only)
JNE
CarryOn
<Space>
3
B
C
X
JMP
Finish
32
51
66
67
88
CarryOn:
OUTCH
LDD
CountDown
DEC
STO
CountDown
JMP
StartProg
Finish:
LDM
#88
OUTCH
END
CountDown:
15
32
51
67
Num1:
32
Trace table:
CountDown
ACC
OUTPUT
15
67
C
15
[5]
(c) The program given in part (b) is to be translated using a two-pass assembler.
The program has been copied here for you. The program now starts with a directive which
tells the assembler to load the first instruction of the program to address 100.
Label
ORG
#0100
StartProg:
LDV
#CountDown
CMP
Num1
JNE
CarryOn
JMP
Finish
CarryOn:
OUTCH
LDD
CountDown
DEC
STO
CountDown
JMP
StartProg
Finish:
LDM
#88
OUTCH
END
CountDown:
15
32
51
67
Num1:
32
On the first pass of the two-pass process, the assembler adds entries to a symbol table.
The following symbol table shows the first eleven entries, part way through the first pass.
The circular labels show the order in which the assembler made the entries to the symbol
table.
Symbol table
Symbolic address
Absolute address
2
1
100
StartProg
3
4
UNKNOWN
CountDown
5
6
UNKNOWN
Num1
7
8
11
UNKNOWN
104
CarryOn
9
10
UNKNOWN
Finish
Explain how the assembler made these entries to the symbol table.
…
…
…
…

5
9608/12/O/N/17 · Question 4Oct/Nov 2017Paper 1222 marks
Loading question…
Question text

4
The following diagram shows the components and buses found inside a typical personal computer
(PC).
A
B
F
D
C
E
Control unit
Main memory
(a) Some components and buses only have labels A to F to identify them.
For each label, choose the appropriate title from the following list. The title for label D is
already given.
•
Control bus
•
Address bus
•
Arithmetic Logic Unit (ALU)
•
General purpose registers
•
Secondary storage
•
System clock
A
…
B
…
C
…
D
Data bus
E
…
F
…
[5]
(b) Clock speed is a factor that affects the performance of a PC. Explain this statement.
…
…
… [2]
(c) An assembly language program can contain both macros and directives.
(i)
Explain what is meant by these terms.
Macro …
…
…
Directive …
…
…
[3]
(ii)
Give an example of the use of a directive.
…
… [1]
(d) 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
Op code
Operand
(mnemonic)
Direct addressing. Load the contents of the given address
LDD
<address>
to ACC.
Relative addressing. Move to the address n locations from
the address of the current instruction. Load the contents of
LDV
#n
this address to ACC.
Store the contents of ACC at the given address.
STO
<address>
Increment the contents of ACC.
INC
Output the character corresponding to the ASCII character
OUTCH
code in ACC.
Following a compare instruction, jump to <address> if the
JPE
<address>
compare was True.
Jump to the given address.
JMP
<address>
CMP
#n
Compare the contents of ACC with number n.
Complete the trace table for the following assembly language program.
Label
Instruction
StartProg:
LDV
#Offset
CMP
Value
ASCII code table (selected codes only)
JPE
EndProg
<Spa

6
9608/11/O/N/16 · Question 8Oct/Nov 2016Paper 1113 marks
Loading question…
Question text

8
The table shows assembly language instructions for a processor which has one general purpose
register, the Accumulator (ACC) and an Index Register (IX).
Instruction
Explanation
Op code
Operand
LDD
<address>
Direct addressing. Load the contents of the given 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.
STO
<address>
Store contents of ACC at the given address.
ADD
<address>
Add the contents of the given address to ACC.
CMP
<address>
Compare contents of ACC with contents of <address>
Following a compare instruction, jump to <address> if the compare
JPE
<address>
was True.
Following a compare instruction, jump to <address> if the compare
JPN
<address>
was False.
JMP
<address>
Jump to the given address.
Output to the screen the character whose ASCII value is stored in
OUT
ACC.
END
Return control to the operating system.
The diagram shows the contents of the main memory:
Main memory
0110
0100
800
0111
1100
801
1001
0111
802
0111
0011
803
1001
0000
804
0011
1111
805
0000
1110
806
1110
1000
807
1000
1110
808
1100
0010
809
:
:
1011 0101
2000
(a) (i)
Show the contents of the Accumulator after execution of the instruction:
LDD
802
Accumulator:
[1]
(ii) Show the contents of the Accumulator after execution of the instruction:
LDX 800
0
0
0
0
1
0
0
1
Index Register:
Accumulator:
Explain how you arrived at your answer.
…
…
…
… [3]
(b) (i)
Complete the trace table below for the following assembly language program. This
program contains denary values.
LDD
800
100
ADD
801
101
STO
802
102
LDD
803
103
CMP
802
104
JPE
107
105
JPN
110
106
STO
802
107
OUT
108
JMP
112
109
LDD
801
110
OUT
111
END
112
:
:
40
800
50
801
0
802
90
803
Selected values from the ASCII character set:
ASCII code
40
50
80
90
100
Character
(
2
P
Z
d
Trace table:
Memory address
ACC
OUTPUT
800
801
802
803
40
50
0
90
[4]
(ii)
There is a redundant instruction in the code in part (b)(i).
State the address of this instruction.
… [1]
(c) The program used the ASCII coding system for character codes. An alternative coding system
is Unicode.
(i)
Give two disadvantages of using ASCII code.
1 …
…
2 …
… [2]
(ii)
Describe how Unicode is designed to overcome the disadvantages of ASCII.
…
…
…
…

7
9608/12/O/N/18 · Question 3Oct/Nov 2018Paper 1218 marks
Loading question…
Question text

3
The following table shows assembly language instructions for a processor which has one general
purpose register, the Accumulator (ACC) and an Index Register (IX).
Instruction
Explanation
Op code
Operand
Direct addressing. Load the contents of the location at the given address to
LDD
<address>
ACC.
Indexed addressing. Form the address from <address> + the contents of the
LDX
<address>
Index Register. Copy the contents of this calculated address to ACC.
Immediate addressing. Load the number n to IX.
LDR
#n
Store contents of ACC at the given address.
STO
<address>
Add the contents of the given address to ACC.
ADD
<address>
Add 1 to the contents of the register (ACC or IX).
INC
<register>
Subtract 1 from the contents of the register (ACC or IX).
DEC
<register>
Compare contents of ACC with contents of <address>.
CMP
<address>
Following compare instruction, jump to <address> if the compare was True.
JPE
<address>
Following compare instruction, jump to <address> if the compare was False.
JPN
<address>
JMP
<address>
Jump to the given address.
OUT
Output to the screen the character whose ASCII value is stored in ACC.
Return control to the operating system.
END
(a) (i)
State what is meant by absolute addressing and symbolic addressing.
Absolute addressing …
…
Symbolic addressing …
…
[2]
(ii)
Give an example of an ADD instruction using both absolute addressing and symbolic
addressing.
Absolute addressing …
Symbolic addressing …
[2]
(b) (i)
State what is meant by indexed addressing and immediate addressing.
Indexed addressing …
…
Immediate addressing …
…
[2]
(ii)
Give an example of an instruction that uses:
Indexed addressing …
Immediate addressing …
[2]
(c) The current contents of a general purpose register (X) are:
X
1
1
0
0
0
0
0
1
(i)
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
… [1]
(ii)
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
… [1]
(iii)
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
… [1]
(d) The current contents of the main memory, Index Register (IX) and selected values from the
ASCI

8
9608/12/O/N/21 · Question 9Oct/Nov 2021Paper 123 marks
Loading question…
Question text

9
The sequence of operations shows, in register transfer notation, the fetch stage of the
fetch-execute cycle.
←
[PC]
1 MAR
←
[PC] + 1
2 PC
←
[[MAR]]
3 MDR
←
[MDR]
4 CIR
Write a description of each of the three register transfer notations given in the following table.
Register transfer notation
Description
…
←
MAR
[PC]
…
…
←
PC
[PC] + 1
…
…
←
MDR
[[MAR]]
…
[3]

Advertisement
9
9608/11/O/N/21 · Question 8Oct/Nov 2021Paper 114 marks
Loading question…
Question text

8
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
Op code
Operand
Direct addressing. Load the contents of the location at the given
LDD
<address>
address to the ACC
Indirect addressing. The address to be used is at the given address.
LDI
<address>
Load the contents of this second address to the ACC
STO
<address>
Store the contents of the 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)
JMP
<address>
Jump to the given address
The current contents of the main memory are:
Address
Instruction
LDI 160
130
ADD 153
131
STO 153
132
LDD 160
133
INC ACC
134
STO 160
135
JMP 130
136
…
13
150
23
151
11
152
0
153
…
150
160
Complete the trace table for two iterations of the loop.
Memory address
Instruction
ACC
address
150
151
152
153
160
13
23
11
0
150
[4]

10
9608/12/O/N/20 · Question 3Oct/Nov 2020Paper 1214 marks
Loading question…
Question text

3
(a) Complete the following statements about CPU architecture by filling in the missing terms.
The Von Neumann model for a computer system uses the … program
concept.
A program is a series of instructions that are saved in … .
The processor … each instruction, … it and then
… it.
The processor uses several … to store the data and instructions from
the program because they can be accessed faster than main memory.
[6]
(b) The following table shows assembly language instructions for a processor that has one
general purpose register, the Accumulator (ACC).
Instruction
Explanation
Op code
Operand
Direct addressing. Load the contents of the location at the given address to
LDD
<address>
ACC.
LDM
#n
Immediate addressing. Load the denary number n to ACC.
Indirect addressing. The address to be used is at the given address. Load the
LDI
<address>
contents of this second address to ACC.
STO
<address>
Store contents of ACC at the given address.
ADD
<address>
Add the contents of the given address to ACC.
CMP
<address>
Compare the contents of ACC with the contents of <address>.
OUT
Output to screen the character whose ASCII value is stored in ACC.
INC
<register>
Add 1 to the contents of the register (ACC or IX).
JPE
<address>
Following a compare instruction, jump to <address> if the compare was True.
Following a compare instruction, jump to <address> if the compare was
JPN
<address>
False.
END
Return control to the operating system.
(i)
The current contents of the
main memory are:
ASCII code table (Selected codes only)
Address
Instruction
LDD 80
ASCII Code
Character
50
ADD 80
51
38
&
STO 80
52
39
‘
LDD 82
53
40
(
INC ACC
54
41
)
STO 82
55
42
*
CMP 81
56
JPN 50
57
LDD 80
58
OUT
59
END
60
…
10
80
2
81
0
82
Trace the program currently in memory using the following trace table.
The first instruction has been completed for you.
Memory address
Instruction
ACC
Output
address
80
81
82
10
2
0
50
10
[5]
(ii)
Assembly language instructions can be put into groups.
Tick (✓) one box in each column to identify the appropriate instruction group for each of
the three assembly language instructions.
Assembly language instruction
Instruction group
STO 80
JPN 50
INC ACC
Input and output of data
Data movement
Arithmetic operations
Unconditional and conditional jump instructions
Compare instructions
[3]

Advertisement