*Boolean propositional logic* is a branch of mathematics. It is used to analyze the overall truth value of simple statements which are with operators such as AND, OR and NOT.
Let's start with an example to make this a bit more accessible. If we say
The sky is blue AND the sun is shining.
Then both parts of the sentence must be true to make the entire sentence true. Boolean logic only deals with statements which are either TRUE or FALSE. TRUE is typically encoded as $1$ while FALSE is encoded as $0$.
In order to connect different parts of a sentence (so called clauses), we use operators like AND. We can summarize how AND works in a so-called truth table.
The columns and the rows denote the inputs to the AND operator, the entries in the table are the result.
| AND | 0 | 1 |
| ----- | --- | --- |
| **0** | 0 | 0 |
| **1** | 0 | 1 |
Only if both inputs are true (lower right corner), then the result is true.
Other operators are OR
| OR | 0 | 1 |
| ----- | --- | --- |
| **0** | 0 | 1 |
| **1** | 1 | 1 |
and NOT, which just negates the input ($0$ turns to $1$, $1$ turn into $0$).
In computer science and electrical engineering, Boolean expressions can also be pictorially expressed as [[Logic Gate| logic gates]].
>[!read]- Further Reading
> - [[Algorithm]]
> - [[Logic Gate]]
>[!ref]- References