Comp
Comp
Q2: Convert the following positive denary numbers into 8-bit binary numbers in the two’s complement
format:
a) 125
[2]
Q3: Convert the following binary numbers (written in two’s complement format) into positive denary
numbers:
-128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 1
Working Space:
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
[2]
Q4: Convert the following negative denary numbers into binary numbers using the two’s complement
format:
a) -92
Working Space:
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
[3]
Q4: Convert the following negative binary numbers (written in two’s complement format) into negative
denary numbers:
a)
-128 64 32 16 8 4 2 1
1 1 1 1 1 1 0 1
Working Space:
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
b)
-128 64 32 16 8 4 2 1
1 1 1 1 0 0 0 1
Working Space:
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
[6]
Q6: A school network has several computers. Each computer in the network has a media access control
(MAC) address. Hexadecimal is used for MAC addresses. Part of a MAC address is given
97-5C-E1
[6]
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
____________________________________________________________________________________[2]
A logical left shift of two places in performed on the binary value. Complete the binary register to
show its contents after this logical left shift.
[3]
[3]
(d) Two 8-bit binary values are added. The result of this calculation needs to be stored in an 8-bit register.
The denary result of this calculation is 301. This generates an error. State the name of this type of error and
explain why this error occurs.
(ii) Explanation
______________________________________________________________________________________
______________________________________________________________________________________
____________________________________________________________________________________[1]
00001111
Sol:___________________________________________________________________________________
______________________________________________________________________________________
____________________________________________________________________________________[2]
f) Shift the binary number four places to the left and comment on your result of part e.
Sol:___________________________________________________________________________________
______________________________________________________________________________________
____________________________________________________________________________________[2]
Section II
Q8:
[6]
[6]
[6]
Q9: a) Write Logic and Boolean Expression for the following truth table.
A B C X
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Logic Expression:
[6]
Boolean Expression:
[6]
(b) Draw a logic circuit to represent the given truth table. Each logic gate should have maximum of two
inputs. Do not simplify the logic circuit.
[6
]
Q10: Draw symbol, Truth table and expression to represent XOR Gate.
[4]
Q11: Tickets are sold for a concert at $20 each, if 10 tickets are bought then the discount is 10%, if 20 tickets
are bought the discount is 20%. No more than 25 tickets can be bought in a single transaction. Draw a
flowchart showing an algorithm to calculate the cost of buying a given number of tickets.
[10]