Hardware: logic circuits, Boolean algebra and processors – A Level Computer Science (old syllabus, to 2021) (9608)
30 questions · page 2 of 2
Question text
4
(a) A Boolean expression corresponds to the following truth table.
INPUT
OUTPUT
A
B
C
X
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
1
(i)
Write the Boolean expression for the truth table by applying the sum‑of‑products.
X = … [2]
(ii)
Complete the Karnaugh Map (K‑map) for the truth table.
AB
00
01
11
10
0
C
1
[1]
(iii)
The K‑map can be used to simplify the expression in part (a)(i).
Draw loop(s) around appropriate groups of 1s in the table in part (a)(ii) to produce an
optimal sum‑of‑products.
[3]
(iv)
Write the simplified sum‑of‑products expression for your answer to part (a)(iii).
X = … [3]
(b) A logic circuit with four inputs produces the following truth table.
INPUT
OUTPUT
A
B
C
D
X
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
(i)
Complete the K‑map that corresponds to the truth table.
AB
CD
[4]
(ii)
Draw loop(s) around appropriate groups of 1s in the table in part (b)(i) to produce an
optimal sum‑of‑products.
[2]
(iii)
Write the simplified sum‑of‑products expression for your answer to part (b)(ii).
X = … [2]
Question text
3
(a) Consider the following Boolean expression.
A . B . C + A . B . C + A . B . C
Use Boolean algebra to simplify the expression.
…
…
…
…
…
…
…
… [4]
(b) (i)
Complete the truth table for the following logic circuit.
A B C
X
Working space
A
B
C
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[2]
(ii)
Complete the Karnaugh Map (K-map) for the truth table in part (b)(i).
AB
00
01
11
10
0
C
1
[1]
(iii)
Draw loops around appropriate groups of 1s in the table in part (b)(ii) to produce an
optimal sum-of-products.
[2]
(iv)
Using your answer to part (b)(iii), write a simplified sum-of-products Boolean expression.
X = … [2]
(c) The truth table for a logic circuit with four inputs is shown.
INPUT
OUTPUT
A
B
C
D
X
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
(i)
Complete the K-map for the truth table in part (c).
AB
CD
[4]
(ii)
Draw loops around appropriate groups of 1s in the table in part (c)(i) to produce an
optimal sum-of-products.
[2]
(iii)
Using your answer to part (c)(ii), write a simplified sum-of-products Boolean expression.
X = … [2]
Question text
5
(a) Most desktop or laptop computers use CISC (Complex Instruction Set Computing)
architecture. Most smartphones and tablets use RISC (Reduced Instruction Set Computing).
State four features that are different for the CISC and RISC architectures.
1 …
…
2 …
…
3 …
…
4 …
…
[4]
(b) In a RISC processor, four instructions (A, B, C, D) are processed using pipelining.
The following table shows five stages that take place when instructions are fetched and
executed. In time interval 1, instruction A has been fetched.
(i)
In the table, write the instruction labels (A, B, C, D) in the correct time interval for each
stage. Each operation only takes one time interval.
Time interval
Stage
1
2
3
4
5
6
7
8
9
A
Fetch instruction
Decode instruction
Execute instruction
Access operand in memory
Write result to register
[3]
(ii)
When completed, the table in part (b)(i) shows how pipelining allows instructions to be
carried out more rapidly. Each time interval represents one clock cycle.
Calculate how many clock cycles are saved by using pipelining in the example in
part (b)(i).
Show your working.
Working …
…
…
Answer …
[3]
(c) The table shows four statements about computer architecture.
Put a tick (✓) in each row to identify the computer architecture associated with each statement.
Architecture
Statement
SIMD
MIMD
SISD
Each processor executes a different instruction
There is only one processor
Each processor executes the same instruction input
using data available in the dedicated memory
Each processor typically has its own partition within a
shared memory
[4]
Question text
4
(a) A Boolean expression produces the following truth table.
INPUT
OUTPUT
A
B
C
X
0
0
0
0
0
0
1
0
0
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
0
1
1
1
0
(i)
Write the Boolean expression for the truth table as a sum-of-products.
X = … [2]
(ii)
Complete the Karnaugh Map (K-map) for the truth table in part (a)(i).
AB
00
01
11
10
0
C
1
[1]
The K-map can be used to simplify the function in part (a)(i).
(iii)
Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products
for the table in part (a)(ii).
[2]
(iv)
Write the simplified sum-of-products expression for your answer to part (a)(iii).
X = … [2]
(b) A logic circuit with four inputs produces the following truth table.
INPUT
OUTPUT
A
B
C
D
X
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
0
1
1
1
0
1
1
1
1
1
0
0
1
1
1
1
0
(i)
Complete the K-map that corresponds to the truth table.
AB
CD
[4]
(ii)
Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products
for the table in part (b)(i).
[2]
(iii)
Write the simplified sum-of-products expression for your answer to part (b)(ii).
X = … [2]
Question text
2
(a) The following diagram shows four descriptions and four types of computer architecture.
Draw lines to connect each description to the appropriate computer architecture.
Description
Computer architecture
Most parallel computer systems use
this architecture.
SIMD
Widely used to process 3D graphics in
video games.
MIMD
A microprocessor is used to control a
washing machine.
MISD
There are a number of processing
units. Each processing unit executes
SISD
the same instruction but on different
data.
[4]
(b) A computer has a single processor that contains four processing units.
Explain why this is not an example of a massively parallel computer.
…
…
…
… [2]
(c) An application has previously executed on a single computer. The application will be
transferred onto a massively parallel computer.
The program code used in the application will need to be updated to ensure that the power of
the massively parallel computer is fully used.
Explain what changes will be required to the program code.
…
…
…
… [2]
(d) Explain one of the hardware issues that will have to be overcome if a massively parallel
computer is to function successfully.
…
…
…
… [2]
Question text
5
(a) (i)
Complete the truth table for this 2-input NAND gate:
A
B
X
A
0
0
0
1
X
1
0
B
1
1
[1]
(ii)
Complete the truth table for this 3-input NAND gate:
A
B
C
X
0
0
0
0
0
1
A
0
1
0
X
0
1
1
B
1
0
0
C
1
0
1
1
1
0
1
1
1
[1]
(b) A SR flip-flop is constructed using two NAND gates.
S
Q
Q
R
(i)
Complete the truth table for the SR flip-flop:
S
R
Q
Q
Initially
1
0
0
1
R changed to 1
1
1
S changed to 0
0
1
S changed to 1
1
1
S and R changed to 0
0
0
1
1
[3]
(ii)
The final row in the table in part b(i) shows that the output for both Q and Q is 1.
Explain why this is a problem.
…
…
…
… [2]
(c) Another type of flip-flop is the JK flip-flop.
A JK flip-flop is constructed as follows:
J
Q
Clock
Q
K
(i)
Complete this truth table for the JK flip-flop.
Initial
Final
values
values
Working space
Q
Q
J
K
Clock
Q
Q
0
0
1
1
0
1
0
0
0
1
0
1
0
1
0
1
1
1
0
0
1
0
1
1
0
1
0
1
1
0
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
0
1
[4]
(ii)
Explain why the JK flip-flop is an improvement on the SR flip-flop.
…
…
…
… [2]
(d) Explain the role of flip-flops in a computer.
…
…
…
… [2]
Question text
2
(a) The following diagram shows four descriptions and two types of processor.
Draw lines to connect each description to the appropriate type of processor.
Description
Type of processor
It has a simplified set of instructions.
Emphasis is on the hardware rather
CISC
than the software.
It makes extensive use of general
RISC
purpose registers.
Many instruction formats are available.
[4]
(b) In a RISC processor, instructions are processed using pipelining.
(i)
Explain what is meant by pipelining.
…
…
…
… [2]
(ii)
The following table shows the five stages that occur when instructions are fetched and
executed. The table also shows a number of time intervals.
Two instructions, D followed by E, are fetched and executed. The ‘E’ in the incomplete
table shows that instruction E has been fetched in time interval 2.
Complete each row of the table.
Time interval
Stage
1
2
3
4
5
6
7
8
Fetch instruction
E
Read registers and decode instruction
Execute instruction
Access operand in memory
Write result to register
[3]
(c) The instruction set for a RISC processor that allows pipelining includes the following
instruction.
Instruction
Explanation
Op code
Operands
Add the integers in registers op1 and op2.
ADD
<dest>, <op1>, <op2>
Place the result in register dest.
A program contains the following three instructions.
ADD r3, r2, r1
ADD r5, r4, r3
ADD r10, r9, r8
(i)
Explain why pipelining fails for the first two instructions.
…
…
…
… [2]
(ii)
The instructions were produced by a compiler after translation of a high-level language
program.
The compiler is not capable of code optimisation.
State how the code from the compiler could have been optimised to overcome the
problem in part (c)(i).
…
… [1]
Question text
3
(a) This diagram shows how applications P, Q and a software development environment can be
run on a virtual machine system.
Software
Application P
Application Q
development
environment
… A … operating
… A … operating system 1
system 2
Virtual machine software / virtual machine monitor
… B … operating system
Hardware
(i)
State the operating systems labelled A and B in the diagram.
A …
B …
[2]
(ii)
Application P is executing and requests data from a file.
Describe what happens after … A … operating system 1 has received the data request
from the application.
…
…
…
…
…
… [3]
(b) A software development company uses virtual machines to produce software.
(i)
State one benefit to the company.
…
… [1]
(ii)
Explain two limitations of this approach.
Limitation 1 …
…
…
…
Limitation 2 …
…
…
…
[4]
Question text
5
(a) Complete the truth table for this NOR gate:
A
B
X
0
0
A
0
1
X
B
1
0
1
1
[1]
A SR flip-flop is constructed using two NOR gates.
R
Q
Q
S
(b) Complete the truth table for the SR flip-flop:
S
R
Q
Q
Initially
1
0
1
0
S changed to 0
0
0
R changed to 1
0
1
R changed to 0
0
0
S and R changed to 1
1
1
[4]
Another type of flip-flop is the JK flip-flop. The JK flip-flop is an improvement on the SR flip-flop.
(c) (i)
The JK flip-flop has three inputs. Two of the inputs are the Set (J) and the Reset (K).
State the third input.
… [1]
(ii)
There are two problems with the SR flip-flop that the JK flip-flop overcomes.
State each problem and state why it does not occur for the JK flip-flop.
Problem 1 …
…
…
…
Problem 2 …
…
…
…
[4]
Question text
3
Consider the following logic circuit, which contains a redundant logic gate.
A
X
B
C
(a) Write the Boolean algebraic expression corresponding to this logic circuit.
X = … [3]
(b) Complete the truth table for this logic circuit.
A
B
C
Working space
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[2]
(c) (i)
Complete the Karnaugh Map (K-map) for the truth table in part (b).
AB
00
01
11
10
0
C
1
[1]
The K-map can be used to simplify the expression in part (a).
(ii)
Draw loop(s) around appropriate groups to produce an optimal sum-of-products.
[2]
(iii)
Write a simplified sum-of-products expression, using your answer to part (ii).
X = … [2]
(d) One Boolean identity is:
̅
A + A.B
= A + B
Simplify the expression for X in part (a) to the expression for X in part (c)(iii). You should use
the given identity.
…
…
…
… [2]
Question text
3
A logic circuit is shown:
P
S
Q
R
(a) Write the Boolean algebraic expression corresponding to this logic circuit:
S = … [4]
(b) Complete the truth table for this logic circuit:
P
Q
R
Working space
S
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[2]
(c) (i)
Complete the Karnaugh Map (K-map) for the truth table in part (b).
PQ
00
01
11
10
0
R
1
[1]
The K-map can be used to simplify the function in part (a).
(ii)
Draw loop(s) around appropriate groups to produce an optimal sum-of-products.
[1]
(iii)
Write a simplified sum-of-products expression, using your answer to part (ii).
S = … [1]
(d) One Boolean identity is:
(A + B) . C = A . C + B . C
Simplify the expression for S in part (a) to the expression for S in part (c)(iii).
You should use the given identity and De Morgan’s Laws.
…
…
…
…
…
…
…
… [3]
Question text
4
(a) (i)
Complete the truth table for this logic circuit.
Input
Output
X
A
X
Y
A
B
Y
0
0
0
1
1
0
B
1
1
[2]
(ii)
State the name given to this logic circuit.
… [1]
(iii)
Name the labels usually given to A and B.
Label A …
Label B …
Explain why your answers are more appropriate for the A and B labels.
…
…
…
… [4]
(b) (i)
Write the Boolean expression corresponding to the following logic circuit:
A
B
X
C
… [2]
(ii)
Use Boolean algebra to simplify the expression that you gave in part (b)(i).
Show your working.
…
…
…
…
…
… [3]
Question text
5
(a) (i)
A half adder is a logic circuit with the following truth table.
Input
Output
X
Y
A
B
0
0
0
0
0
1
0
1
1
0
0
1
1
1
1
0
The following logic circuit is constructed.
P
X
A
J
HALF ADDER
Q
Y
B
X
A
HALF ADDER
R
K
Y
B
Complete the following truth table for this logic circuit.
Input
Working space
Output
P
Q
R
J
K
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[2]
(ii)
State the name given to this logic circuit.
… [1]
(iii)
Name the labels usually given to J and K.
Label J …
Label K …
Explain why your answers are appropriate labels for these outputs.
…
…
…
… [4]
(b) (i)
Write down the Boolean expression corresponding to the following logic circuit:
A
B
X
C
… [2]
(ii) Use Boolean algebra to simplify the expression given in part (b)(i).
Show your working.
…
…
…
…
…
… [4]
Question text
3
(a) The following diagram shows how applications X, Y and Z can run on a virtual machine
system.
Application X
Application Y
Application Z
Guest operating
Guest operating system 1
system 2
Virtual machine software / virtual machine monitor
Host operating system
Hardware
(i)
The virtual machine software undertakes many tasks.
Describe two of these tasks.
Task 1 …
…
Task 2 …
… [2]
(ii)
Explain the difference between a guest operating system and a host operating
system.
…
…
…
… [2]
(b) A company uses a computer as a web server. The manufacturer will no longer support the
computer’s operating system (OS) in six months’ time. The company will then need to decide
on a replacement OS.
The company is also considering changing the web server software when the OS is changed.
Whenever any changes are made, it is important that the web server service is not disrupted.
In developing these changes, the company could use virtual machines.
(i)
Describe two possible uses of virtual machines by the company.
Use 1 …
…
…
…
Use 2 …
…
…
… [4]
The web server often has to handle many simultaneous requests.
(ii)
The company uses a virtual machine to test possible solutions to the changes that they
will need to make.
Explain one limitation of this approach.
…
…
…
… [2]
Question text
5
(a) Complete the truth table for this NAND gate:
A
B
X
0
0
A
0
1
X
B
1
0
1
1
[1]
A SR flip-flop is constructed using two NAND gates.
S
Q
Q
R
(b) (i)
Complete the truth table for the SR flip-flop.
–
S
R
Q
Q
Initially
1
0
0
1
R changed to 1
1
1
S changed to 0
0
1
S changed to 1
1
1
S and R changed to 0
0
0
[4]
(ii)
One of the combinations in the truth table should not be allowed to occur.
State the values of S and R that should not be allowed. Justify your choice.
S = …
R = …
…
…
…
… [3]
Another type of flip-flop is the JK flip-flop.
(c) (i)
Give one extra input present in the JK flip-flop.
…
… [1]
(ii)
Give one advantage of the JK flip-flop.
…
… [1]
(d) Describe the role of flip-flops in a computer.
…
…
…
… [2]