CS Unit 1 EoT Exam Solutions
CS Unit 1 EoT Exam Solutions
NOT
OR
AND
b. Draw the associated truth tables for EACH of the THREE basic logic gates [3
mks]
NOT OR AND
X Y OUT X Y OUT
0 0 0 0 0 0
0 1 1 0 1 0
1 0 1 1 0 0
1 1 1 1 1 1
c. Draw the truth table that shows the output from a circuit that performs the
function NOT (X AND Y). [2mks]
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
2. State the range of integers with 8-bits, using sign magnitude representation [2mks]
1111 1111 - 0111 1111 (1mk for each correct value)
3. The binary sequence 01111110 equates to the decimal value 126, using two’s
complement.
a. Show the steps involved in determining that the 8-bit two’s complement
representation of the value -126 in binary sequence is 10000010 [2mks]
Add 1: 10000001
+ 1
= 10000010
ans = -2.5
(1mk for each relevant step, full mks for adequate solution)
b. The logic circuit below represents a system of three switches A, B and C. The
combination of switches illustrated determines whether a bell, X, sounds.
Select - choose the best solution that addresses the problem most effectively