SOF108 COMPUTER ARCHITECTURE
SESSION: September 2019
TUTORIAL 3: Digital Logic – I
1 Use bitwise operators to manipulate individual bits specified in the followings. Show
your working.
a) Turn on bit 2 of the bit-string 1010
b) Turn off all but bits 1 and 2 of the bit-string 1100
c) Flip bit 3 of the bit-string 1110
d) turn off bit 1 of 011010
2 Convert these hexadecimal strings to binary (although we did not have this in the
lecture, you should be fairly familiar with different number representations)
a) AE
b) 10
3 Represent the following decimal numbers using 3-bit 2's complement representation:
a) - 5
b) - 3
c) 5
d) 4
4 Assume 4-bit numbers with 2's complement encoding, decode the following:
a) 1100
b) 0101
5 Write down all the possible 4-bit numbers with 2's complement encoding, and show
their decimal representations.
6 What is overflow in a 2's complement encoding? What are the indications that there
is an overflow?
7 A computer stores numbers in 8-bit 2’s complement form. What is the largest
positive number? What is the negative number with the largest magnitude?
8 Perform the following arithmetic operations using 8-bit 2's complement notation,
i.e., first represent the numbers using 8-bit 2’s complement followed by the
arithmetic operation. Indicate if there is an overflow.
a) 8710 − 2910
b) −5610 − 7410
9 Write the output expression for each circuit as it appears in the below figures.
10 Implement the following logic expressions using AND gates, OR gates and
inverters as needed.
a) 𝑌 = 𝐴̅𝐵̅ + 𝐵(𝐴 + 𝐶)
b) 𝑌 = (𝐴 + 𝐵)(𝐶̅ + 𝐷)
11 Prove the followings using a truth table and algebraically. You may use the table
from the lecture slide.
a) ̅̅̅̅̅̅̅ = 𝑥̅ + 𝑦̅ + 𝑧̅
(𝑥𝑦𝑧)
b) 𝑎𝑏̅𝑐 + 𝑎𝑏𝑐 + 𝑎̅𝑏𝑐 = 𝑎𝑐 + 𝑏𝑐
c) (𝐴̅ + 𝐶)(𝐴 + 𝐷
̅ )(𝐵 + 𝐶̅ + 𝐷) = 𝐴𝐵𝐶 + 𝐴̅𝐶̅ 𝐷
̅ + 𝐴̅𝐵𝐷
̅ + 𝐴𝐶𝐷
12 Derive the SOP and POS expressions for the following truth tables (F: output).
a)
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
b)
A B C F
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
13 Build the truth table for the Boolean expression : 𝑍 = 𝐴(𝐵 + 𝐶𝐷). From the truth
table determine the standard SOP and POS expressions.
14 Write the algebraic expressions in terms of the inputs from the following logic
circuits to prove the output of the circuits.