π Overview
This lecture introduces the foundational concepts of Boolean algebra, essential for understanding digital logic and computer science. Weβll cover basic Boolean operations, their truth tables, and corresponding logic gates, ensuring a strong base for future exercises.
π―Learning Objectives
- Explain the importance of digital systems β 2025-09-28
- Describe the benefits of digital systems over analog systems β 2025-09-28
- Get familiar with binary systems and basic Boolean algebra β 2025-09-28
- Convert numbers between different base systems (e.g., from decimal to binary and vice versa) β 2025-09-28
- Compute with negative and positive numbers β 2025-09-28
π‘Key Concepts & Definitions
Boolean Algebra
A branch of algebra where variables can only have two truth values: true (1) or false (0). Itβs fundamental to digital circuits and logic design.
Boolean Variable
A variable that can hold only one of two possible values, typically denoted as 0 (False) or 1 (True).
Truth Table
A mathematical table used in logic to compute the functional values of logical expressions on all possible combinations of their arguments.
Logic Gate
An elementary building block of a digital circuit that implements a Boolean function.
β Formulas
Basic Boolean Identities
- AND Gate (Logical Conjunction):
A AND B = A β B - OR Gate (Logical Disjunction):
A OR B = A + B - NOT Gate (Logical Negation):
NOT A = A'orΔ
Commutative Laws
A β B = B β AA + B = B + A
Associative Laws
(A β B) β C = A β (B β C)(A + B) + C = A + (B + C)
Distributive Laws
A β (B + C) = (A β B) + (A β C)A + (B β C) = (A + B) β (A + C)
De Morganβs Laws
!(A β B) = !A + !Bor(A β B)' = A' + B'!(A + B) = !A β !Bor(A + B)' = A' β B'
βοΈ Notes
Boolean Algebra is a branch of algebra in which the values of the variables are the truth values true and false, usually denoted with 1 and 0 respectively. It was introduced by George Boole in his 1854 book βAn Investigation of the Laws of Thoughtβ.
Key Principles:
- Binary Values: Variables can only take two states (0 or 1).
- Logical Operations: Operations like AND, OR, NOT are defined.
- Axioms and Theorems: Follows a set of rules and identities for manipulation.
Importance:
- Digital Circuits: Fundamental for designing and analyzing digital electronic circuits (e.g., in computers, smartphones).
- Set Theory: Closely related to set operations (intersection, union, complement).
- Computer Science: Used in programming, database queries, and artificial intelligence.
Solving/simplifying

Logic Gates
Logic gates are the fundamental building blocks of any digital system. They are electronic circuits that perform basic Boolean functions. Most logic gates have two inputs and one output. The state of the output is determined by the state of the inputs based on the Boolean operation they represent.
Key Characteristics:
- Digital Operations: Process binary signals (0s and 1s).
- Building Blocks: Combine to form complex digital circuits, microprocessors, and memory.
- Implemented using: Diodes, transistors, and resistors.
Basic Logic Gates:
1. AND Gate
- Function: Output is HIGH (1) only if all inputs are HIGH.
- Symbol:
\begin{tikzpicture}
\draw (0,0) node[and gate, draw, logic gate inputs=2] {};
\node at (0.9,0) {A β
B};
\end{tikzpicture}2. OR Gate
- Function: Output is HIGH (1) if any input is HIGH.
- Symbol:
\begin{tikzpicture}
\draw (0,0) node[or gate, draw, logic gate inputs=2] {};
\node at (0.9,0) {A + B};
\end{tikzpicture}3. NOT Gate (Inverter)
- Function: Output is the inverse of the input.
- Symbol:
\begin{tikzpicture}
\draw (0,0) node[not gate, draw] {};
\node at (0.6,0) {A'};
\end{tikzpicture}Universal Gates:
4. NAND Gate
- Function: The
NOTofAND. Output is LOW (0) only if all inputs are HIGH. - Symbol:
\begin{tikzpicture}
\draw (0,0) node[nand gate, draw, logic gate inputs=2] {};
\node at (0.9,0) {(A β
B)'};
\end{tikzpicture}5. NOR Gate
- Function: The
NOTofOR. Output is HIGH (1) only if all inputs are LOW. - Symbol:
\begin{tikzpicture}
\draw (0,0) node[nor gate, draw, logic gate inputs=2] {};
\node at (0.9,0) {(A + B)'};
\end{tikzpicture}Exclusive Gates:
6. XOR Gate (Exclusive OR)
- Function: Output is HIGH (1) if inputs are different.
- Symbol:
\begin{tikzpicture}
\draw (0,0) node[xor gate, draw, logic gate inputs=2] {};
\node at (0.9,0) {A β B};
\end{tikzpicture}π Summary
Boolean operations are fundamental logical operations on binary values (true/false, 1/0). They form the basis of digital circuits and computer logic.
π‘ Explanation
Boolean operations manipulate binary inputs to produce a single binary output. They are crucial for designing and understanding digital systems.
Key Operations:
- AND (β§):
- Output is true (1) only if ALL inputs are true (1).
A AND B| A | B | A AND B | |---|---|---------| | 0 | 0 | 0 | | 0 | 1 | 0 | | 1 | 0 | 0 | | 1 | 1 | 1 |
- OR (β¨):
- Output is true (1) if AT LEAST ONE input is true (1).
A OR B| A | B | A OR B | |---|---|--------| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 1 |
- NOT (Β¬):
- Output is the INVERSE of the input.
NOT A| A | NOT A | |---|-------| | 0 | 1 | | 1 | 0 |
Example: Logic Gate Application
Consider a simple circuit: (A AND B) OR (NOT C)
| A | B | C | A AND B | NOT C | (A AND B) OR (NOT C) |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
πΌοΈ Diagrams & Visuals
A simple logic circuit demonstrating AND, OR, and NOT gates:
graph TD A[Input A] --> G1 B[Input B] --> G1 G1(AND Gate) --> G3 C[Input C] --> G2 G2(NOT Gate) --> G3 G3(OR Gate) --> Output
π Related Resources
π Resources
- Presentation:
β Post lecture
π Homework
Truth Tables
A truth table is a mathematical table used in logic (especially Boolean algebra, Boolean functions, and propositional calculus) to compute the functional values of logical expressions on all possible combinations of their arguments.
Purpose:
- Define Logic Gates: Clearly shows the output for every possible input combination of a logic gate (e.g., AND, OR, NOT).
- Evaluate Boolean Expressions: Helps in determining the truth value of complex Boolean expressions.
- Verify Equivalence: Used to check if two different Boolean expressions are logically equivalent.
How to Construct:
- Identify Inputs: Determine all independent Boolean variables (e.g., A, B, C).
- Determine Number of Rows: For
ninput variables, there will be2^nrows in the table (representing all unique combinations). - List Input Combinations: Systematically list all
2^ninput combinations. A common method is to count in binary. - Evaluate Sub-expressions: If the expression is complex, evaluate intermediate parts step-by-step in separate columns.
- Determine Final Output: Compute the final output of the entire expression for each input combination.
Example: A AND (NOT B)
Here, n=2 inputs (A, B), so 2^2 = 4 rows.
| A | B | NOT B (Bβ) | A β Bβ |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
π Summary: Basics of Boolean Operation
This lecture provided a fundamental introduction to Boolean algebra, which is critical for understanding digital systems.
-
Introduction to Boolean Algebra:
- Purpose: Deals with variables that can only be
True(1) orFalse(0). - Application: Forms the basis of digital circuit design, computer logic, and programming.
- Purpose: Deals with variables that can only be
-
Basic Boolean Operations:
- AND (β
): Output is
Trueonly if all inputs areTrue.0 β 0 = 0,0 β 1 = 0,1 β 0 = 0,1 β 1 = 1
- OR (+): Output is
Trueif any input isTrue.0 + 0 = 0,0 + 1 = 1,1 + 0 = 1,1 + 1 = 1
- NOT (β): Inverts the input; if input is
True, output isFalse, and vice versa.0' = 1,1' = 0
- AND (β
): Output is
-
Derived Boolean Operations:
- XOR (β) - Exclusive OR: Output is
Trueif inputs are different.0 β 0 = 0,0 β 1 = 1,1 β 0 = 1,1 β 1 = 0
- NAND:
NOTofAND. Output isFalseonly if all inputs areTrue. - NOR:
NOTofOR. Output isTrueonly if all inputs areFalse.
- XOR (β) - Exclusive OR: Output is
-
Truth Tables:
- A systematic way to list all possible input combinations and their corresponding outputs for a Boolean expression or logic gate.
- Example (AND Gate):
A B A β B 0 0 0 0 1 0 1 0 0 1 1 1
-
Introduction to Logic Gates:
- Physical implementations of Boolean operations using electronic circuits.
- Common Gates: AND, OR, NOT, XOR, NAND, NOR.
- These gates are the fundamental building blocks of all digital devices.
<smtcmp_block language=βmermaidβ> graph TD subgraph Basic Logic Gates A[Input A] β AND1 B[Input B] β AND1 AND1(AND) β C[Output C]
D[Input D] --> OR1
E[Input E] --> OR1
OR1(OR) --> F[Output F]
G[Input G] --> NOT1
NOT1(NOT) --> H[Output H]
end