Chapter 10: Boolean Logic:
Logic Gates:
Name Symbol Function
1 AND Becomes TRUE when both
its inputs are TRUE
2 OR Becomes TRUE when any
one of its inputs is TRUE or
both are TRUE
3 NOT Has only one input. Inverts
the input from False to True
and vice versa
4 NOR Becomes TRUE when all
(NOT OR) inputs are FALSE
5 XOR Becomes TRUE ONLY when
one of the inputs is TRUE
6 NAND Becomes TRUE in all cases
(NOT AND) except both inputs being
TRUE
Chapter 10: Boolean Logic
10.1 Standard Logic Gate Symbols
What is Boolean Logic?
Boolean logic is a form of algebra used in computer systems.
It works with only two values:
o 1 (TRUE / ON)
o 0 (FALSE / OFF)
Used in:
o Digital circuits
o CPUs
o Memory
o Decision making in programs
Computers use Boolean logic because electronic circuits can easily represent
ON/OFF states.
Logic Gates
Logic gates are electronic circuits that take one or more inputs and
produce a single output.
Each gate follows a Boolean rule.
Standard logic gate symbols you must recognize in exams:
AND
OR
NOT
NAND
NOR
XOR
10.2 The Function of the Six Logic Gates
1. AND Gate
Rule:
Output is 1 only if ALL inputs are 1
Input A Input B Output
0 0 0
0 1 0
1 0 0
1 1 1
Boolean expression:
A AND B or A · B
Real-life example:
A security door opens only if keycard AND PIN are correct.
2. OR Gate
Rule:
Output is 1 if AT LEAST ONE input is 1
Input A Input B Output
0 0 0
0 1 1
1 0 1
1 1 1
Boolean expression:
A OR B or A + B
Example:
Alarm sounds if motion OR door sensor is triggered.
3. NOT Gate
Rule:
Output is the opposite of the input
Input Output
0 1
1 0
Boolean expression:
NOT A or ¬A
Important:
NOT gate has only one input
4. NAND Gate
Rule:
Opposite of AND
Output is 0 only if ALL inputs are 1
A B Output
0 01
0 11
1 01
1 10
Boolean expression:
NOT (A AND B)
NAND gates are universal gates
→ Any logic circuit can be built using only NAND gates
5. NOR Gate
Rule:
Opposite of OR
Output is 1 only if ALL inputs are 0
A B Output
0 01
0 10
1 00
1 10
Boolean expression:
NOT (A OR B)
NOR is also a universal gate
6. XOR Gate (Exclusive OR)
Rule:
Output is 1 only if inputs are DIFFERENT
A B Output
0 00
0 11
A B Output
1 01
1 10
Boolean expression:
A⊕B
Used in:
Binary addition (half adders)
10.3 Logic Circuits, Expressions, Truth Tables & Problem Statements
Logic Circuits
A logic circuit is a combination of logic gates
Output of one gate can be input to another
Used to represent real system behaviour
📌 You must be able to:
Trace signals through circuits
Find final output
Truth Tables
A truth table shows:
All possible input combinations
Corresponding output(s)
Steps to create a truth table:
1. List all inputs
2. Write all possible 0/1 combinations
3. Calculate output for each row
Example (A AND B):
A B Output
0 00
0 10
1 00
1 11
Logic Expressions
Written using Boolean operators:
o AND
o OR
o NOT
Examples:
A AND B
(A OR B) AND C
NOT (A AND B)
📌 Order of precedence:
1. NOT
2. AND
3. OR
From Circuit → Expression
Write expressions step by step
Start from inner gates, move outward
From Expression → Truth Table
1. Identify inputs
2. Apply Boolean rules row-by-row
3. Fill output column
NOR Gate