Computer Science 5
Computer Science 5
[1]
[1]
(iii) Use the expressions for S and C to draw a single logic circuit for the truth table.
[2]
[4]
2(a) An XOR gate is shown below. Complete the truth table for XOR.
A B Q
1 1
1 0
0 1
0 0
[2]
A B Cin S Cout
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0
[4]
(ii) Explain what the circuit does. You should refer to A, B, Cin, S and Cout in your answer.
(c)
[1]
[2]
3(a) All users of a computer system have a unique username and password. The computer system has implemented
two-factor authentication so that users must respond to either an email or text message containing a secret code
to be able to access the system.
Let:
B be a Boolean value for if a user enters a password that matches their username
C be a Boolean value for if a user is able to respond to an email containing a secret code
D be a Boolean value for if a user is able to respond to a text message containing a secret code
Q≡
(i) Simplify this Boolean expression so that it does not include any negation. You must explain which Boolean
algebra rule(s) you are using at each step.
[2]
(c)
The logic circuit above has two inputs (A, B) and two outputs (S, C).
S≡
C≡
[2]
A B S C
0 0
0 1
1 0
(iii) Describe how this logic circuit can be adapted to add together two 4-bit binary numbers.
[4]
Q = (A ∧ ¬B) ∨ (¬A ∧ C ∧ D) ∨ (A ∧ B)
Complete the Karnaugh Map below to simplify this expression. Show your working.
Simplified expression:
[4]
Q = ¬(A ∧ B) ∨ (C ∧¬ D)
[3]
(a)
(i) Shown below in Fig.2 is the Burger House children’s menu.
Children receive a free toy when they select a meal (i.e. one burger, one side dish and one dessert)
made up of only healthy options.
Let g be a Boolean value for if a child has chosen a grilled chicken burger.
Let s be a Boolean value for if a child has chosen salad.
Let c be a Boolean value for if a child has chosen carrot sticks.
Let f be a Boolean value for if a child has chosen fruit salad.
Let t be a Boolean value for whether a child receives a toy.
Write an expression using Boolean algebra to determine whether a child receives a toy when they select
a meal.
t=
(b)
(ii) Burger House wants to add this logic into its till system.
Complete the code below assuming that g,s,c,f and t are Boolean variables with the same meaning as
part (i).
[2]
Complete and use the Karnaugh map below to simplify the expression above.
Simplified expression:
[4]
Q ≡ ¬ (A Λ B) V C
A B C Q
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]
Fig. 4
Complete the truth table below for the logic circuit shown in Fig. 4.
A B C D 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
[4]
State the Boolean expression represented by the Karnaugh map in Fig. 9.1, in its smallest form.
[4]
(i) ¬ ¬A
[1]
[1]
[1]
10(a) A NAND gate and its truth table are shown in Fig. 10.1.
Draw a set of gates equivalent to a NAND gate, but built only of AND, OR and NOT gates.
[2]
[1]
(c) Draw the output of the flip-flop from Fig. 10.2 on the diagram below.
[3]
[1]
(b) Explain the difference in the function of OR and XOR gates.
[2]
A B C D Output
1 1 1 1
1 1 1 0
1 1 0 1
1 1 0 0
1 0 1 1
1 0 1 0
1 0 0 1
1 0 0 0
0 1 1 1
0 1 1 0
0 1 0 1
0 1 0 0
0 0 1 1
0 0 1 0
0 0 0 1
0 0 0 0
[4]
≡ Output
[2]
Let:
A be Customer is under 18
C be Customer is over 60
D be Customer has ID
Q≡ [3]
(b) The cinema has a voucher which promises free popcorn when the voucher is produced whilst buying a soft drink
or bottle of water.
Let:
E be Voucher is shown
R ≡ (E⋀F) ⋁ (E⋀G)
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0
[4]
(E⋀F) ⋁ (E⋀G)
[2]
Most films are now distributed to cinemas digitally. A studio allows cinemas to download its latest film 5 days
before the release date via a private download. It wants to ensure that no cinema shows it before the release
date.
A B Sum Carry
1 1 0 1
1 0 1 0
0 1 1 0
0 0 0 0
[3]
[4]
Q≡¬A⋁B
[2]
(b) Find the Boolean expression represented in the Karnaugh Map below. Show your working.
[5]
The device, when placed in a room, listens out for the phrase “Hey Bertie”. When someone says that phrase it
then listens to the question that follows and tries to give a relevant answer.
Bertie Butler’s circuitry is designed to only listen out for “Hey Bertie” under certain circumstances, which are:
The privacy button (P) must be off and the microphone must generate a signal (S) to say a sound has been
heard.
(i) Complete the truth table for whether the device is listening (L).
P S L
False False
False True
True False
True True
[2]
[3]
(i) Complete the Karnaugh map below for the Boolean expression (¬ A ∧ ¬ B) ∨ ( A ∧ ¬ B)
[3]
(ii) Use the Karnaugh map to find a simplified Boolean expression that is equivalent to (¬ A ∧ ¬ B) ∨ ( A ∧ ¬ B)
[2]
[2]
(ii) Describe the inputs and outputs used by a D-type flip-flop circuit, explaining how the inputs are used to
control the outputs.
[4]
Total 8
2 a A B Q 2
1 1 0
1 0 1
0 1 1
0 0 0
b i 4
Accept instead of ∨
Accept instead of ∨
One mark for ((A∨B) ∧ Cin)
Accept AND instead of ∧
One mark for ∨ (A ∧ B)
Accept OR instead of ∨
Accept + instead of ∨
Total 13
3 a Q≡A∧B 3 AO1.2 Q ≡ A ∧ B ∧ (C ∨ D)
∧
(C ∨ D) Accept alternative symbols for AND / OR
e.g. Q = A AND B AND (C OR D)
Brackets must be included for 3rd point
Allow XOR for bullet point 3
Any additional symbols max 2 marks
Total 13
Total 7
t ≡ g. s + c .f
ii 2 For 2 marks.
Accept forms.
Total 5
Total 4
Total 2
Total 4
b i A 1
ii ¬(A∨ B) 1
iii A∨B 1
Total 7
10 a 2
c 3
Total 6
Examiner’s Comments
b OR gate outputs true if at least one of its 2 AO1.2 Accept appropriate, correctly labelled, truth
inputs is true (1) tables. One mark for each truth table.
Total 9
1 mark for the ∨ joining the two parts. Accept AB as (A.B) and CD as (C.D)
Examiner’s Comments
In general, most candidates achieved all of
the available marks in these questions.
ii (F∨G) ∧ E 2 Accept:
(AO2.2) (G∨F) ∧ E
Examiner’s Comments
In general, most candidates achieved all of
the available marks in these questions.
Total 9
13 a 3
(AO1,1)
Examiner’s Comments
Most candidates scored well on these
questions demonstrating their
understanding of logic gate circuits. Some
candidates simplified the circuit in part b)
which achieved full marks provided the
resultant circuit gave the same output.
Or equivalent.
Or equivalent.
Examiner’s Comments
Most candidates scored well on these
questions demonstrating their
understanding of logic gate circuits. Some
candidates simplified the circuit in part b)
which achieved full marks provided the
resultant circuit gave the same output.
Total 7
14 a 2 (AO1.2)
Examiner’s Comments
Total 7
Examiner’s Comments
Total 5
ii ¬ B / NOT B 2
Karnaugh map used to show 1s
highlighted with overlap AO2.2
ii Data input 4
Clock input
Q output AO1.1
When clock input goes high… (2)
…Q changes to D AO1.2
NOT Q is reverse of Q (2)
Total 11