Level 2 — RecallBoolean Algebra & Logic Gates

Boolean Algebra & Logic Gates

30 minutes40 marksprintable — key stays hidden on paper

Level: 2 (Recall / Standard textbook problems) Time Limit: 30 minutes Total Marks: 40


Q1. Convert the following. (4 marks) (a) Binary 10110110210110110_2 to decimal. (b) Decimal 237237 to hexadecimal.

Q2. Find the 8-bit two's complement representation of 45-45. Show your working. (4 marks)

Q3. State De Morgan's two theorems in Boolean form. (4 marks)

Q4. Construct the truth table for the function F=AB+ABF = A \cdot \overline{B} + \overline{A} \cdot B. What single common gate does this represent? (4 marks)

Q5. Complete the outputs of the following 2-input gates for inputs A=1,B=0A=1, B=0: (4 marks) (a) NAND (b) NOR (c) XOR (d) XNOR

Q6. Using Boolean algebra laws, simplify the expression: (5 marks) F=AB+AB+ABF = A\cdot B + A \cdot \overline{B} + \overline{A}\cdot B Name one law used at each simplification step.

Q7. Convert 627086270_8 (octal) to binary, and then group the binary into hexadecimal. (4 marks)

Q8. A logic function of three variables is 11 only for minterms m1,m3,m5,m7m_1, m_3, m_5, m_7. (5 marks) (a) Write the SOP (sum of minterms) expression in terms of A,B,CA, B, C. (b) Simplify using a Karnaugh map to its minimal form.

Q9. Show that a NAND gate is universal by implementing the NOT and AND functions using only NAND gates. Draw/describe the connections. (4 marks)

Q10. Two logic gates are cascaded. Gate 1 has a propagation delay of 8 ns8\text{ ns} and Gate 2 has 5 ns5\text{ ns}. What is the total worst-case propagation delay of the cascade? (2 marks)


End of Paper

Answer keyMark scheme & solutions

Q1. (4 marks) (a) 101101102=128+32+16+4+2=1821010110110_2 = 128+32+16+4+2 = 182_{10}. Bits: 1(128)+0+1(32)+1(16)+0+1(4)+1(2)+0=1821(128)+0+1(32)+1(16)+0+1(4)+1(2)+0 = 182. (2 marks) (b) 23710237_{10}: 237=13×16+9=D916237 = 13\times16 + 9 = \text{D}9_{16}. So 237=ED237 = \text{ED}? Check: E=14E=14, 14×16=22414\times16=224, 224+13=237224+13=237, so 237=ED16237 = \text{ED}_{16}. (2 marks) Why: 237/16=14237/16 = 14 rem 1313 → high digit E, low digit D.

Q2. (4 marks) +45=001011012+45 = 00101101_2 (1 mark). Invert bits → 1101001011010010 (1 mark). Add 1 → 11010011211010011_2 (2 marks). Why: two's complement = invert then +1 of the magnitude.

Q3. (4 marks) AB=A+B\overline{A \cdot B} = \overline{A} + \overline{B} (2 marks). A+B=AB\overline{A + B} = \overline{A}\cdot\overline{B} (2 marks). Why: complement of a product is the sum of complements, and vice versa.

Q4. (4 marks)

A B ABA\overline B AB\overline A B F
0 0 0 0 0
0 1 0 1 1
1 0 1 0 1
1 1 0 0 0

(3 marks for correct table). This is the XOR gate (1 mark).

Q5. (4 marks, 1 each) For A=1,B=0A=1,B=0: (a) NAND =10=0=1=\overline{1\cdot0}=\overline{0}=1 (b) NOR =1+0=1=0=\overline{1+0}=\overline{1}=0 (c) XOR =10=1=1\oplus0=1 (d) XNOR =10=0=\overline{1\oplus0}=0

Q6. (5 marks) F=AB+AB+ABF = AB + A\overline B + \overline A B =A(B+B)+AB= A(B+\overline B) + \overline A B — distributive (1) =A1+AB= A\cdot 1 + \overline A B — complement law B+B=1B+\overline B=1 (1) =A+AB= A + \overline A B — identity A1=AA\cdot1=A (1) =A+B= A + B — absorption/redundancy A+AB=A+BA+\overline A B = A+B (2) Final: F=A+BF = A + B.

Q7. (4 marks) Each octal digit → 3 bits: 6=1106=110, 2=0102=010, 7=1117=111, 0=0000=000. Binary =110010111000=1100101110002= 110\,010\,111\,000 = 110010111000_2 (2 marks). Group in 4s from right: 110010111000=CB8=CB8161100\,1011\,1000 = \text{C}\,\text{B}\,8 = \text{CB8}_{16} (2 marks).

Q8. (5 marks) (a) Minterms m1,m3,m5,m7m_1,m_3,m_5,m_7 correspond to C=1C=1 (odd minterms). F=ABC+ABC+ABC+ABCF = \overline A\,\overline B C + \overline A B C + A\overline B C + A B C (2 marks). (b) K-map: all four cells where C=1C=1 are 1 → the entire C=1C=1 column/rows. F=CF = C (3 marks). Why: every minterm has C=1C=1 regardless of A,BA,B, so F=CF=C.

Q9. (4 marks) NOT: tie both inputs of a NAND together: AA=A\overline{A\cdot A}=\overline A (2 marks). AND: first NAND gives AB\overline{A\cdot B}; feed that through a NAND-as-inverter: AB=AB\overline{\overline{A\cdot B}}=A\cdot B (2 marks). Why: NAND can produce NOT and (NAND+NOT) = AND, showing functional completeness.

Q10. (2 marks) Total delay =8+5=13 ns= 8 + 5 = 13\text{ ns} (delays add in a cascade).


[
  {"claim":"Binary 10110110 = 182 decimal","code":"result = (int('10110110',2)==182)"},
  {"claim":"237 decimal = ED hex","code":"result = (format(237,'X')=='ED')"},
  {"claim":"-45 in 8-bit two's complement = 11010011","code":"result = (format((-45)%256,'08b')=='11010011')"},
  {"claim":"Octal 6270 = binary 110010111000 = hex CB8","code":"v=int('6270',8); result = (bin(v)[2:]=='110010111000' and format(v,'X')=='CB8')"},
  {"claim":"Cascade delay 8ns + 5ns = 13ns","code":"result = (8+5==13)"}
]