9th Class Computer Science Unit 3 Digital Systems and Logic Design – Notes, MCQs and Questions (New Syllabus)

Last updated: 4 December 2026 · Punjab Board 9th Class Computer Science and Entrepreneurship (new syllabus 2025-26) · Unit 3

Easy, exam-focused notes for Unit 3: Digital Systems and Logic Design of the new Punjab Board 9th class Computer Science book. Short answers are written to fit the board e-sheet answer space. All exercise MCQs are checked against the textbook answer key.

In this unit

  1. Analog and digital signals, ADC and DAC
  2. Boolean algebra: AND, OR, NOT
  3. Boolean functions and truth tables
  4. Logic gates
  5. Boolean laws, duality and simplification
  6. Half-adder and full-adder
  7. Karnaugh map (K-map)
  8. Exercise: MCQs, short and long questions
  9. FAQs

Notation: a bar on top means NOT, e.g. A = NOT A. “·” means AND, “+” means OR, “⊕” means XOR.

3.1 Basics of digital systems

Analog signalDigital signal
Changes smoothly and continuouslyDiscrete – only two values, 0 and 1
Infinite possible values in a rangeFinite values
Examples: voice, body temperature, radio wavesExample: binary data in computers
Affected more by noiseLess affected by noise; better for storage and long-distance transfer
  • ADC (Analog-to-Digital Converter): changes analog signals into digital so computers and phones can process them. Example: a microphone turns your voice into digital data.
  • DAC (Digital-to-Analog Converter): changes digital data back into analog so humans can perceive it. Example: speakers turn digital audio back into sound waves.
  • Logic levels: a high voltage (e.g. 5 V) means 1 and a low voltage (0 V) means 0.
Note: one line in the book says DAC converts analog to digital. The correct meaning is the reverse: DAC converts digital to analog, as the book’s own speaker example shows.

3.2 Boolean algebra and basic operations

Boolean algebra (by George Boole, born 1815 in England) works with only two values: True (1) and False (0). Its three basic operations are AND, OR and NOT.

ABA AND B (A·B)A OR B (A+B)A XOR B (A⊕B)
00000
01011
10011
11110
ANOT A (A)
01
10
  • AND: output 1 only when all inputs are 1 (two switches in series: bulb glows only if both are ON).
  • OR: output 1 when at least one input is 1 (alarm rings if either sensor detects a problem). In logic, 1 + 1 = 1.
  • NOT: gives the opposite of its single input.

Boolean functions and truth tables

A Boolean function has one or more binary inputs and one binary output, built with AND, OR and NOT. Example: F(A, B) = A·B is 1 only when A = B = 1. A truth table lists the output for every possible input combination (2ⁿ rows for n inputs).

ABCA·BAA·CF = A·B + A·C
0000100
0010111
0100100
0110111
1000000
1010000
1101001
1111001

Uses in computers: arithmetic in the ALU, data processing in memory and storage, and control logic that coordinates the parts of the computer. Phones and calculators use them all the time.

3.2.2 Logic gates

GateOutput is 1 when…Expression
ANDall inputs are 1A·B
ORat least one input is 1A+B
NOTthe input is 0 (inverts)A
NANDat least one input is 0 (AND followed by NOT)A·B
XORexactly one input is 1 (inputs are different)A⊕B

Creating a logic diagram: find the gates the function needs, arrange them in the order of the operations, then connect the inputs and output.

3.3 Boolean laws and simplification

LawOR formAND form
IdentityA + 0 = AA · 1 = A
NullA + 1 = 1A · 0 = 0
IdempotentA + A = AA · A = A
ComplementA + A = 1A · A = 0
CommutativeA + B = B + AA · B = B · A
Associative(A + B) + C = A + (B + C)(A·B)·C = A·(B·C)
DistributiveA + B·C = (A + B)·(A + C)A·(B + C) = A·B + A·C
AbsorptionA + A·B = AA·(A + B) = A
De MorganA + B = A·BA·B = A + B
Double negationA = A

Duality: the dual of a Boolean expression is made by swapping AND ↔ OR and 0 ↔ 1 (variables stay the same). If an identity is true, its dual is also true. Example: A + 0 = A has the dual A · 1 = A.

Example: simplify A + A·B
= (A + A)·(A + B) (distributive) = 1·(A + B) (complement) = A + B (identity)
Example: simplify (A + B)·(A + B)
= A + B·B (distributive) = A + 0 (complement) = A (identity)

Simpler expressions need fewer gates, so circuits become smaller, cheaper, faster and use less power.

3.5.1 Half-adder and full-adder

ABSum (S)Carry (C)
0000
0110
1010
1101

Half-adder adds two bits. S = A ⊕ B (XOR gate), C = A · B (AND gate). It cannot accept a carry from a previous column.

ABCinSumCout
00000
00110
01010
01101
10010
10101
11001
11111

Full-adder adds three bits (A, B and carry-in). Sum = A ⊕ B ⊕ Cin, Cout = A·B + Cin·(A ⊕ B). Sum is 1 when an odd number of inputs are 1; carry is 1 when at least two inputs are 1. It can be built from two half-adders and an OR gate.

3.5.2 Karnaugh map (K-map)

  • A K-map is a grid that simplifies Boolean expressions visually, without long algebra.
  • Size: 2 variables = 2×2, 3 variables = 2×4, 4 variables = 4×4.
  • Each cell is a minterm – a product (AND) term containing every variable once, plain or complemented. For A = 1, B = 0, C = 1 the minterm is ABC (m5).
  • Neighbouring cells differ by one bit (Gray code order).
  • Steps: draw the grid → fill 1s and 0s from the truth table → group adjacent 1s in groups of 1, 2, 4, 8 … (rows or columns) → write one term per group.
Example: simplify A·B + A·B + A·B with a K-map
Cells: A=0,B=0 → 0; A=0,B=1 → 1; A=1,B=0 → 1; A=1,B=1 → 1.
Group the column B = 1 → B; group the row A = 1 → A.
F = A + B

Unit 3 exercise (solved)

A. Multiple choice questions

1. Which of the following Boolean expressions represents the OR operation?
(a) A · B   (b) A + B   (c) A̅   (d) A ⊕ B
Answer: (b) A + B – “+” is the OR symbol.

2. What is the dual of the Boolean expression A · 0 = 0?
(a) A + 1 = 1   (b) A + 0 = A   (c) A · 1 = A   (d) A · 0 = 0
Answer: (a) A + 1 = 1 – Swap AND with OR and 0 with 1.

3. Which logic gate outputs true only if both inputs are true?
(a) OR gate   (b) AND gate   (c) XOR gate   (d) NOT gate
Answer: (b) AND gate – AND gives 1 only when all inputs are 1.

4. In a half-adder circuit, the carry is generated by which operation?
(a) XOR operation   (b) AND operation   (c) OR operation   (d) NOT operation
Answer: (b) AND operation – Carry = A · B; the sum uses XOR.

5. What is the decimal equivalent of the binary number 1101?
(a) 11   (b) 12   (c) 13   (d) 14
Answer: (c) 13 – 8 + 4 + 0 + 1 = 13.

B. Short questions

Q1. Define a Boolean function and give an example.
A Boolean function takes one or more binary inputs (0/1) and gives one binary output using AND, OR and NOT. Example: F(A, B) = A·B, which is 1 only when both A and B are 1.
Q2. What is the significance of the truth table in digital logic?
A truth table shows the output of a logic expression or circuit for every possible combination of inputs. It is used to understand, check and design digital circuits.
Q3. Explain the difference between analog and digital signals.
Analog signals change continuously and can take any value (voice, temperature). Digital signals are discrete and have only two values, 0 and 1 (computer data); they resist noise better.
Q4. Describe the function of a NOT gate with its truth table.
A NOT gate (inverter) has one input and gives the opposite value: input 0 → output 1, input 1 → output 0. Expression: A.
Q5. What is the purpose of a Karnaugh map in simplifying Boolean expressions?
A K-map shows a truth table as a grid so that adjacent 1s can be grouped. This gives the simplest expression quickly without long algebra, so the circuit needs fewer gates.

C. Long questions

Q1. Explain the usage of Boolean functions in computers.
  • Arithmetic: the ALU uses Boolean functions (adders) to add, subtract, multiply and divide.
  • Data processing: reading, writing and handling binary data in memory and storage.
  • Control logic: the control unit uses them to coordinate all parts of the computer.
  • Daily devices: phones (keypad input, unlocking) and calculators use Boolean logic to give the right result.
Q2. Describe how to construct a truth table for a Boolean expression, with an example.
  1. Count the inputs (n) and make 2ⁿ rows.
  2. Write all input combinations in binary order.
  3. Add a column for each part of the expression.
  4. Work out the final column.
Example F = A·B + A·C: columns A·B, A, A·C and F; F = 1 for inputs 001, 011, 110 and 111 (see the table above).
Q3. Describe the concept of duality in Boolean algebra with an example.
The dual of an expression is formed by changing every AND to OR, every OR to AND, every 0 to 1 and every 1 to 0. If an identity is true, its dual is also true. Examples: A + 0 = A ↔ A · 1 = A; A + 1 = 1 ↔ A · 0 = 0; A·(B + C) = A·B + A·C ↔ A + B·C = (A + B)·(A + C).
Q4. Compare half-adders and full-adders.
Half-adderFull-adder
Inputs2 (A, B)3 (A, B, Cin)
SumA ⊕ BA ⊕ B ⊕ Cin
CarryA · BA·B + Cin·(A ⊕ B)
Gates1 XOR + 1 AND2 XOR + 2 AND + 1 OR (two half-adders + OR)
UseLowest (first) bitEvery other bit, where a carry comes in
Q5. How do Karnaugh maps simplify Boolean expressions? Give an example.
  1. Draw a grid for the number of variables (2 → 2×2).
  2. Fill each cell with the output from the truth table.
  3. Group adjacent 1s in powers of two (1, 2, 4 …), as large as possible.
  4. Write a term for each group, keeping only variables that do not change inside it.
Example: A·B + A·B + A·B → 1s in cells 01, 10, 11 → groups “B = 1” and “A = 1” → F = A + B.
Q6. Design a 4-bit binary adder using half-adders and full-adders.
  • Bit 0 (rightmost): a half-adder adds A0 + B0 → S0 and carry C1.
  • Bits 1, 2, 3: full-adders add Ai + Bi + Ci → Si and carry to the next bit.
  • The last carry C4 is the overflow / 5th bit. This chain is called a ripple-carry adder.
  • Example: 0101 (5) + 0011 (3): bit0 1+1 = 0 carry 1; bit1 0+1+1 = 0 carry 1; bit2 1+0+1 = 0 carry 1; bit3 0+0+1 = 1 → 1000 (8).
Q7. Simplify F(A, B) = A·B + A·B̅ using Boolean rules.
F = A·(B + B) (distributive) = A·1 (complement) = A (identity)
Q8. Use De Morgan’s laws to simplify F = (A + B)̅ + (A·C)̅.
F = A·B + (A + C) (De Morgan) = A·B + A + C = A·(B + 1) + C = A + C (null and identity laws)
Q9. Simplify: (a) (A + B)̅·(A + B) (b) (A + B̅)·(A̅ + B) (c) A + A̅·(B̅ + C) (d) (A·B)̅ + A·B (e) A·B + A̅·B̅
(a) X̅·X = 0 (complement law, X = A + B)
(b) A·A + A·B + B·A + B·B = A·B + A·B (XNOR)
(c) A + A·X = A + X → A + B + C
(d) X̅ + X = 1 (complement law, X = A·B)
(e) A·B + A·B is already simplest; it is the XNOR of A and B (1 when A = B).
9th class computer unit 3 MCQs with answers

Unit 3 (Digital Systems and Logic Design) exercise MCQ answers: 1-b, 2-a, 3-b, 4-b, 5-c.

What is the difference between half adder and full adder?

A half-adder adds two bits (Sum = A⊕B, Carry = A·B). A full-adder adds three bits including a carry-in (Sum = A⊕B⊕Cin, Carry = A·B + Cin·(A⊕B)).

What are De Morgan’s theorems?

NOT(A + B) = NOT A · NOT B, and NOT(A · B) = NOT A + NOT B.

What is duality in Boolean algebra?

Swapping AND with OR and 0 with 1 in a true identity gives another true identity, e.g. A + 0 = A and A · 1 = A.

What is a K-map?

A Karnaugh map is a grid used to simplify Boolean expressions by grouping adjacent 1s in groups of 1, 2, 4 or 8.

📄 Download these notes as PDF

Save this chapter to your phone or computer and read it offline, or share it with your friends.

The PDF downloads directly. Long chapters may take a few seconds.

More 9th Class Computer Science

Need a Computer Science home tutor?

Male & female Computer Science tutors in all major cities of Pakistan, home or online. 3-day free demo.

Scroll to Top