Question 1
a) Convert 25510 to: (CLO1)
i. Binary
÷ Dec Remainder as Bin MSB > LSB
2 255
2 127 1
2 63 1
2 31 1
2 15 1
2 7 1
2 3 1
2 1 1
0 1
(255)10 = (1111 1111)2
ii. Octal
÷ Dec Remainder as Octal MSB > LSB
8 255
8 31 0.875 × 8 = 7
8 3 0.875 × 8 = 7
0 0.375 × 8 = 3
(255)10 = (377)8
iii. Hex
÷ Dec Remainder as Hex MSB > LSB
16 255
16 15 0.9375 × 16 = 15
0 0.9375 × 16 = 15
(255)10 = (15 15)16
(255)10 = (𝐹 𝐹)16
iv. BCD – decimal equivalent as binary number (4 bitS)
DECIMAL ÷ Dec Remainder as Bin MSB > LSB
2 5
2 2 1
5 2 1 0
2 0 1
0 0
2 5
2 2 1
255 5 2 1 0
2 0 1
0 0
2 2
2 1 0
2 2 0 1
2 0 0
0 0
(255)10 = (0010 0101 0101)𝐵𝐶𝐷
b) Assuming 8-bit word length, express the decimal number -35 in: (CLO1)
i. One’s complement
decimal number -35 in
One’s complement range −2𝑛−1 − 1 𝑡𝑜 2𝑛−1 − 1
Binary for 3510
÷ Dec Remainder as Bin MSB > LSB
2 35
2 17 1
2 8 1
2 4 0
2 2 0
2 1 0
2 0 1
2 0 0
0 0
(35)10 = (0010 0011)2 − − − −→ 2𝑛−1 − 1
Switch all the digits to their opposite (0→1 and 1→0) In our case,
(0010 0011)2 −→ (1101 1100)2
One’s complement
(−35)10 = (1101 1100)2 − − − −→ −2𝑛−1 − 1
ii. Two’s complement
Add 1 to this value (1101 1100)2 to get Two’s complement
1101 1100 + 1 = (1101 1101)2
Question 2
a) What is De Morgan’s theorem? (CLO2)
De Morgan’s theorem states that reversing the output of any gate that give the same function as the
opposite type of gate (AND vs. OR) with two inverted variables A and B. It is a fundamental principle in
solving Boolean Algebra expressions. It performs gate operations such as NAND and NOR gates.
De Morgan’s theorem can be stated as follows:
i. NAND
̅̅̅̅̅̅
𝐴 ∙ 𝐵 = 𝐴̅ + 𝐵̅ = 𝑌
̅̅̅̅̅̅̅
𝐴∙𝐵
𝐴̅ + ̅̅̅
𝐵
ii. NOR
̅̅̅̅̅̅̅̅
𝐴 + 𝐵 = 𝐴̅ ∙ 𝐵̅ = 𝑌
̅̅̅̅̅̅̅̅
𝐴+𝐵
𝐴̅ ∙ 𝐵
̅̅̅
b) State two properties of Boolean Algebra (CLO2)
Properties of Boolean Algebra
Properties AND (multiply) OR (adding)
𝐴×𝐵 =𝐵×𝐴 𝐴+𝐵 =𝐵+𝐴
Commutative
a variable order either AND or OR operation does not matter in this property
(𝐴 × 𝐵) × 𝐶 = 𝐴 × (𝐵 × 𝐶) (𝐴 + 𝐵) + 𝐶 = 𝐴 + (𝐵 + 𝐶)
Associative This property tells us we can associate groups of ORed or ANDed variables together
with parentheses without changing the truth of the equations.
𝐴 × (𝐵 + 𝐶) = (𝐴 × 𝐵) + (𝐴 × 𝐶) 𝐴 + (𝐵 × 𝐶) = (𝐴 + 𝐵) × (𝐴 + 𝐶)
Explain on how to expand a Boolean expression formed by the product of a sum,
Distributive
and in reverse shows us how terms may be factored out of Boolean sums-of-
products
c) For each of the following expressions construct the corresponding logic circuit by using combination
AND, OR and INVERTER gates only. (CLO2)
i. 𝑤 = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐴𝐵𝐶𝐷 + 𝐴𝐷 ̅̅̅̅
w
̅̅̅̅
ABCD + AD
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
ABCD + AD ̅̅̅̅
̅̅̅̅
AD
ii. 𝑥 = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐾𝐿 + 𝑃𝑁 ̅𝑅
x
̅𝑅
𝐾𝐿 + 𝑃𝑁
̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐾𝐿 + 𝑃𝑁 ̅𝑅
̅
𝑃𝑁
̅𝑅
𝑃𝑁
iii. 𝑦 = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅ + ̅̅̅̅
(𝑃𝑄 𝑅̅ 𝑆)
̅̅̅̅
𝑃𝑄
y
̅̅̅̅ + ̅̅̅̅
𝑃𝑄 𝑅̅ 𝑆 ̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅ + ̅̅̅̅
𝑃𝑄 𝑅̅ 𝑆
𝑅̅
̅̅̅̅
𝑅̅ 𝑆
iv. 𝑧 = ̅̅̅̅̅̅̅̅̅̅̅̅
𝑇𝑈𝑉 + 𝑊 ̅
𝑇𝑈
z
𝑇𝑈𝑉
̅̅̅̅̅̅̅̅̅̅̅̅
𝑇𝑈𝑉 + 𝑊 ̅
̅
𝑇𝑈𝑉 + 𝑊
̅
𝑊
Question 3
𝐺𝑖𝑣𝑒𝑛 𝑋 = 𝐴̅ 𝐵̅ 𝐶̅ 𝐷
̅ + 𝐴̅ 𝐵̅ 𝐶̅ 𝐷 + 𝐴̅ 𝐵̅ 𝐶 𝐷 + 𝐴̅ 𝐵 𝐶̅ 𝐷
̅ + 𝐴̅ 𝐵 𝐶̅ 𝐷 + 𝐴̅ 𝐵 𝐶 𝐷 + 𝐴 𝐵 𝐶̅ 𝐷
̅ + 𝐴 𝐵 𝐶̅ 𝐷
+𝐴𝐵𝐶𝐷
a) Construct the truth table for X (CLO2)
𝐴̅ = 0
𝐴=1
Min terms A B C D QUESTION
23 = 8 22 = 4 21 = 2 20 = 1 X
𝑚0 0 0 0 0 𝐴̅ 𝐵̅ 𝐶̅ 𝐷
̅ 1
𝑚1 0 0 0 1 𝐴̅ 𝐵̅ 𝐶̅ 𝐷 1
𝑚2 0 0 1 0
𝑚3 0 0 1 1 𝐴̅ 𝐵̅ 𝐶 𝐷 1
𝑚4 0 1 0 0 𝐴̅ 𝐵 𝐶̅ 𝐷
̅ 1
𝑚5 0 1 0 1 𝐴̅ 𝐵 𝐶̅ 𝐷 1
𝑚6 0 1 1 0
𝑚7 0 1 1 1 𝐴̅ 𝐵 𝐶 𝐷 1
𝑚8 1 0 0 0
𝑚9 1 0 0 1
𝑚10 1 0 1 0
𝑚11 1 0 1 1
𝑚12 1 1 0 0 𝐴 𝐵 𝐶̅ 𝐷
̅ 1
𝑚13 1 1 0 1 𝐴 𝐵 𝐶̅ 𝐷 1
𝑚14 1 1 1 0
𝑚15 1 1 1 1 𝐴𝐵𝐶𝐷 1
𝑋 = ∑ 𝑚 (0, 1, 3, 4, 5, 7, 12, 13, 15)
b) By using K-map, determine the simplified expression of X (CLO2)
From Question 3(a)
𝑋 = ∑ 𝑚 (0, 1, 3, 4, 5, 7, 12, 13, 15)
simplified expression of X by using K-map:
𝐶̅ 𝐷
̅ 𝐶̅ 𝐷 𝐶𝐷 ̅
𝐶𝐷
X
00 01
11 10
00
𝐴̅ 𝐵̅ 10 11 13 12
𝐴̅ 𝐵 01 14 15 17 16
𝐴𝐵 11 112 113 115 114
𝐴̅𝐵
̅̅̅ 10 18 19 111 110
4 CELL GROUP IN COLOUR
i. GREEN = position 0, 1, 4, 5
Simplify expression = 𝐴′ 𝐶 ′ = 𝐴̅ 𝐶̅
ii. YELLOW = position 1, 3, 5, 7
Simplify expression = 𝐴′ 𝐷 = 𝐴̅ 𝐷
iii. ORANGE = position 4, 5, 12, 13
Simplify expression = 𝐵𝐶 ′ = 𝐵 𝐶̅
iv. BLUE = position 5, 7, 13, 15
Simplify expression = 𝐵 𝐷 = 𝐵 𝐷
simplified expression of X = 𝐴̅ 𝐶̅ + 𝐴̅ 𝐷 + 𝐵 𝐶̅ + 𝐵 𝐷
c) Draw the logic circuits representing the expression of X based on (b) (CLO2)
simplified expression of X = 𝐴̅ 𝐶̅ + 𝐴̅ 𝐷 + 𝐵 𝐶̅ + 𝐵 𝐷
𝐴̅
𝐴̅ ∙ 𝐶̅
𝐴̅ ∙ 𝐷
̅
𝐶
𝐵 ∙ 𝐶̅
𝐵∙ 𝐷
𝐗 = 𝑨̅ 𝑪̅ + 𝑨̅ 𝑫 + 𝑩 𝑪̅ + 𝑩 𝑫
Question 4
a) Prove the following logic expression: (CLO2)
i. 𝐴𝐵 + 𝐴𝐵̅ = 𝐴
𝐴(𝐵 + 𝐵̅ ) = 𝐴 − − − − − − − −→ (1)
∴ 𝑛𝑜𝑡𝑒 𝑡ℎ𝑎𝑡 ′1′ 𝑂𝑅 𝑤𝑖𝑡ℎ 𝑎𝑛𝑦 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑔𝑖𝑣𝑒𝑠 𝑜𝑢𝑡𝑝𝑢𝑡 𝑎𝑠 ′1′
∴ 𝐵 + 𝐵̅ = 1 − −−→ 𝑖𝑓 𝐵 = 0, 𝑡ℎ𝑒𝑛 𝐵̅ = 1
∴ 𝐵 + 𝐵̅ = 0 + 1 = 1 − − − −−→ (2)
Let put (2) into (1)
𝐴(𝐵 + 𝐵̅ ) = 𝐴
𝐴(1) = 𝐴
𝐴 = 𝐴 − − − −−→ ℎ𝑒𝑛𝑐𝑒 𝑝𝑟𝑜𝑣𝑒𝑑
ii. 𝐴𝐵 + 𝐵𝐶 + 𝐴̅ 𝐶 = 𝐴𝐵 + 𝐴̅ 𝐶
∴ 𝑎𝑏𝑜𝑣𝑒 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 𝑎𝑙𝑠𝑜 𝑐𝑎𝑛 𝑤𝑟𝑖𝑡𝑡𝑒𝑛 𝑎𝑠:
𝐴𝐵 + 𝐴̅ 𝐶 + 𝐵𝐶 − − − − − − − − − −→ 𝑐𝑜𝑚𝑚𝑢𝑙𝑎𝑡𝑖𝑣𝑒 𝑙𝑎𝑤
𝐴𝐵 + 𝐴̅ 𝐶 + 1 ∙ 𝐵𝐶 − − − − − − − −−→ 𝑙𝑎𝑤 𝑖𝑛𝑡𝑒𝑟𝑠𝑒𝑐𝑡𝑖𝑜𝑛
𝐴𝐵 + 𝐴̅ 𝐶 + (𝐴 + 𝐴̅ )𝐵𝐶 − − − − − −−→ 𝑐𝑜𝑚𝑝𝑙𝑖𝑚𝑒𝑛𝑡 𝑙𝑎𝑤 => 𝐴 + 𝐴̅ = 1
𝐴𝐵 + 𝐴̅ 𝐶 + 𝐴𝐵𝐶 + 𝐴̅ 𝐵𝐶 − − − − − −−→ 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑣𝑒 𝑙𝑎𝑤
𝐴𝐵 + 𝐴𝐵𝐶 + 𝐴̅ 𝐶 + 𝐴̅ 𝐵𝐶 − − − − − −−→ 𝑐𝑜𝑚𝑚𝑢𝑙𝑎𝑡𝑖𝑣𝑒 𝑙𝑎𝑤
𝐴𝐵 ∙ 1 + 𝐴𝐵𝐶 + 𝐴̅ 𝐶 ∙ 1 + 𝐴̅ 𝐶𝐵 − − − −→ 𝑙𝑎𝑤 𝑖𝑛𝑡𝑒𝑟𝑠𝑒𝑐𝑡𝑖𝑜𝑛
𝐴𝐵(1 + 𝐶) + 𝐴̅ 𝐶(1 + 𝐵) − − − − − −−→ 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑣𝑒 𝑙𝑎𝑤 => 1 + 𝐴 = 1
𝐴𝐵(1) + 𝐴̅ 𝐶(1) − − − − − − − − − −−→ 𝑙𝑎𝑤 𝑜𝑓 𝑢𝑛𝑖𝑜𝑛
𝐴𝐵 + 𝐴̅ 𝐶 − − − −(ℎ𝑒𝑛𝑐𝑒 𝑝𝑟𝑜𝑣𝑒𝑑) − − − −→ 𝑙𝑎𝑤 𝑖𝑛𝑡𝑒𝑟𝑠𝑒𝑐𝑡𝑖𝑜𝑛
b) Given equation below: (CLO2)
𝑧 = 𝐴̅ 𝐵 𝐶̅ + 𝐴 𝐵 𝐶̅ 𝐷̅ + 𝐵 𝐶̅
i. Simplify the logic expression above by using Boolean Algebra technique.
𝑧 = 𝐵 𝐶̅ (𝐴̅ + 1) + 𝐴 𝐵 𝐶̅ 𝐷̅ − − − − − −→ ( ∴ 𝐴
̅ + 1 = 1)
𝑧 = 𝐵 𝐶̅ (1) + 𝐴 𝐵 𝐶̅ 𝐷̅
𝑧 = 𝐵 𝐶̅ (1 + 𝐴 𝐷̅ ) − − − − − −→ ( ∴ 1 + 𝐴
̅ 𝐷 = 1)
𝑧 = 𝐵 𝐶̅ (1)
𝑧 = 𝐵 𝐶̅ − − − −→ 𝑎𝑛𝑠𝑤𝑒𝑟
ii. Draw the simplified circuit-based result in (b(i))
the simplified circuit-based result in (b(i)) is 𝑧 = 𝐵 𝐶̅
𝐵 𝑧 = 𝐵 𝐶̅
𝐶̅