AL ICT – Unit 4: Boolean Logic & Digital Circuits
Operator Precedence (Beginner Friendly Explanation)
This lesson explains Operator Precedence in Boolean Logic step by step, using simple examples from the AL ICT syllabus.
1. What is Operator Precedence?
Operator precedence means the order in which operations are performed in a Boolean expression.
Just like in Mathematics, some operations are done before others.
2. BODMAS Rule (Revision)
In Mathematics, we use BODMAS:
- B – Brackets
- O – Orders (powers, roots)
- D – Division
- M – Multiplication
- A – Addition
- S – Subtraction
Example:
2 + 3 × 4 = 14 (not 20, because multiplication is done first)
3. Boolean Operator Precedence (AL ICT)
In Boolean Algebra, the precedence order is:
- NOT ( ' )
- AND ( . )
- OR ( + )
- XOR ( ⊕ )
Brackets ( ) always have highest priority.
4. Understanding Basic Boolean Operators
- AND ( . ) → Both must be TRUE
- OR ( + ) → At least one TRUE
- NOT ( ' ) → Reverse the value
- XOR ( ⊕ ) → Only one TRUE (not both)
5. Expression: x + y.z
According to precedence, AND (.) is done before OR (+).
Step-by-step:
- First calculate y.z
- Then add x + (result)
So:
x + y.z = x + (y.z)
6. Expression: (x + y).z
Brackets have the highest priority.
Steps:
- Solve inside the bracket → x + y
- Then AND with z
So:
(x + y).z
Note: This is NOT the same as x + y.z
7. Expression: x + y ⊕ z.x
Operator precedence:
- AND (.)
- XOR (⊕)
- OR (+)
Steps:
- First calculate z.x
- Then calculate y ⊕ (z.x)
- Finally calculate x + (result)
8. Real-Life Example (Road Crossing)
Boolean Function:
F = X.Y + Z
Meaning:
- X = Right side clear
- Y = Left side clear
- Z = Signal light OFF
Interpretation:
You can cross the road if:
- Right side AND Left side are clear, OR
- Signal light is OFF
Why AND first? Because both sides must be clear.
9. How to Make a Truth Table
Step 1: Identify Inputs
Inputs are variables like X, Y, Z
If you have:
X and X'
Still only ONE input (X), because X' is just NOT X.
Step 2: Number of Rows
Formula:
2ⁿ (n = number of inputs)
- 1 input → 2 rows
- 2 inputs → 4 rows
- 3 inputs → 8 rows
Step 3: Fill Input Values
| X | Y |
|---|---|
| 0 | 0 |
| 0 | 1 |
| 1 | 0 |
| 1 | 1 |
10. Boolean Function Components
LHS and RHS
Example:
F = X.Y + Z
- LHS → F
- RHS → X.Y + Z
Operators
- +
- .
- '
- ⊕
Variables
X, Y, Z
Terms
Separated by OR (+)
Example:
X.Y + Z → Terms are:
- X.Y
- Z
11. Min Term (SOP – Sum of Products)
Min Term:
- Uses AND between variables
- All variables appear
Example:
X'.Y.Z
SOP = Sum (OR) of product (AND) terms
12. Max Term (POS – Product of Sums)
Max Term:
- Uses OR between variables
- All variables appear
Example:
(X + Y' + Z)
POS = Product (AND) of sum (OR) terms
13. Standard Boolean Functions
- Standard SOP → Only min terms
- Standard POS → Only max terms
14. Practice Questions
- Find the precedence order in: X + Y.Z'
- Rewrite using brackets: X + Y.Z
- Identify inputs in: A + A'
- Write SOP form for: F = X.Y + X'.Z
Truth Table for F = (X'.Y') + (X' + Y')
| X | Y | X' | Y' | X'.Y' | X' + Y' | F |
|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 |
Final Output Column (F): 1, 1, 1, 0
Truth Table for F = AB C' + A'B' C
| A | B | C | C' | AB C' | A'B' C | F |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Truth Table for F = X'.Y + (X + Z')
| X | Y | Z | X' | Z' | X'.Y | X + Z' | F |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 |
Truth Table for F = X + (Y ⊕ X.Z)
| X | Y | Z | X.Z | Y ⊕ X.Z | F |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
End of Lesson – Unit 4 Boolean Logic
No comments:
Post a Comment