Boolean Logic1 / 21
What is Boolean logic?
Boolean logic uses True and False (or 1 and 0) to represent states that can only be one of two values.
Examples from real life:
- A door is open or closed
- A light is on or off
- A lock is locked or unlocked
In computing, Boolean logic is used in conditions inside if statements and loops:
```
IF fingerprint OR correctPIN THEN
unlock ← True
END IF
```
The three core Boolean operators are AND, OR, and NOT.