Boolean Values and Operations
Boolean algebra works with two values:
Basic Operations
| Operation | Symbol | Alternative |
|---|
| AND | ⋅ or ∧ | xy |
| OR | + or ∨ | x+y |
| NOT | x or ¬ | x′ |
Truth Tables for Basic Operations
AND (x⋅y)
| x | y | x⋅y |
|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR (x+y)
| x | y | x+y |
|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT (x)
Boolean Algebra Laws
Identity Laws
x+0=x
x⋅1=x
Null Laws
x+1=1
x⋅0=0
Idempotent Laws
x+x=x
x⋅x=x
Complement Laws
x+x=1
x⋅x=0
Involution Law
x=x
Commutative Laws
x+y=y+x
x⋅y=y⋅x
Associative Laws
(x+y)+z=x+(y+z)
(x⋅y)⋅z=x⋅(y⋅z)
Distributive Laws
x⋅(y+z)=(x⋅y)+(x⋅z)
x+(y⋅z)=(x+y)⋅(x+z)
De Morgan's Laws
x+y=x⋅y
x⋅y=x+y
Absorption Laws
x+(x⋅y)=x
x⋅(x+y)=x
Logic Gates
Basic Gates
| Gate | Symbol | Boolean Expression |
|---|
| AND | ∧ | F=A⋅B |
| OR | ∨ | F=A+B |
| NOT | — | F=A |
| NAND | — | F=A⋅B |
| NOR | — | F=A+B |
| XOR | ⊕ | F=A⊕B |
| XNOR | — | F=A⊕B |
XOR Properties
A⊕B=(A⋅B)+(A⋅B)
A⊕B=(A+B)⋅(A⋅B)
A⊕0=A
A⊕1=A
A⊕A=0
A⊕A=1
Canonical Forms
Minterm and Maxterm
For n variables, a minterm is an AND of all variables (each complemented or not).
A maxterm is an OR of all variables.
For n=2 with variables x,y:
| x | y | Minterm | Maxterm |
|---|
| 0 | 0 | xy (m0) | x+y (M0) |
| 0 | 1 | xy (m1) | x+y (M1) |
| 1 | 0 | xy (m2) | x+y (M2) |
| 1 | 1 | xy (m3) | x+y (M3) |
Disjunctive Normal Form (DNF)
Sum of Products (SOP): OR of minterms where function is 1
F=∑m(i1,i2,…)
Conjunctive Normal Form (CNF)
Product of Sums (POS): AND of maxterms where function is 0
F=∏M(j1,j2,…)
Example
For F(x,y)=xy+xy:
- DNF: F=m1+m3=∑m(1,3)
- CNF: F=M0⋅M2=∏M(0,2)
Simplification Techniques
Algebraic Simplification
Example: Simplify F=xy+xy+xy
F=x(y+y)+xy
=x⋅1+xy
=x+xy
=(x+x)(x+y) (distributive)
=1⋅(x+y)
=x+y
Karnaugh Maps (K-maps)
For 2 variables:
| y | y |
|---|
| x | m0 | m1 |
| x | m2 | m3 |
Group adjacent 1s in powers of 2 to find simplified expression.
Functional Completeness
A set of operations is functionally complete if any Boolean function can be expressed using only those operations.
Complete Sets
- {AND,OR,NOT}
- {AND,NOT}
- {OR,NOT}
- {NAND} alone!
- {NOR} alone!
Expressing with NAND
x=x NAND x
x⋅y=(x NAND y) NAND (x NAND y)
x+y=(x NAND x) NAND (y NAND y)