In Unit 1 you saw that propositions with ∨, ∧ and ¬ obey laws such as De Morgan’s and the distributive laws. Sets with ∪, ∩ and complement obey exactly the same laws, and so do electrical switches. Instead of proving the same laws three times, mathematicians collect them into one structure: a Boolean algebra.
The definition
The order inside (X,∨,∧,′,O,I) matters: the first operation is the join, whose identity is O; the second is the meet, whose identity is I.
Three examples
Boolean algebra
Set X
join ∨
meet ∧
complement
O
I
Propositions
all propositions S
∨ (or)
∧ (and)
¬
contradiction F
tautology T
Power set
P(A), all subsets of a set A
∪
∩
complement A∖Y
∅
A
Switches / bits
{0,1}
parallel (OR)
series (AND)
invert (NOT)
0
1
For example, in the power-set algebra the identity law Y∪∅=Y and the complement law Y∩(A∖Y)=∅ are familiar facts about sets.
Switches and the two-element Boolean algebra
A switch has two states: closed (current flows), written 1, and open, written 0. A variable that can take only the values 0 and 1 is a Boolean variable. The invertx′ of a switch x is always in the opposite state.
Two switches can be connected in two ways:
Parallel and series connections
Parallel (a par b): Series (a ser b): ┌──[ a ]──┐───┤ ├─── ───[ a ]───[ b ]─── └──[ b ]──┘current flows if a OR b current flows if a AND bis closed are closed
a
b
a par b
a ser b
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
1
So {0,1} with par (∨), ser (∧) and invert (′), O=0, I=1, is a Boolean algebra. It is called the two-element Boolean algebra and is written B={0,1}.
The switching algebra Bn
Bn is the set of all n-tuples of bits, e.g. B3={(0,0,0),(0,0,1),…,(1,1,1)} with 8 elements. The operations work component by component:
O=(0,…,0) and I=(1,…,1). This is exactly what a CPU does with bitwise operators: in C or Python, 5 | 1 is 5, 5 & 3 is 1, because 101∨001=101 and 101∧011=001.
Key takeaways
A Boolean algebra: (X,∨,∧,′,O,I) satisfying associative, commutative, distributive, identity and complement laws.
Bn (switching algebra) works component by component, like bitwise operators.
Practice questions
Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 6 · short answer
Show that the complement laws hold in the two-element Boolean algebra B={0,1}.
Show worked answer
In B, O=0, I=1, 0′=1 and 1′=0. Law x∧x′=O: for x=0, 0∧1=0; for x=1, 1∧0=0. Law x∨x′=I: for x=0, 0∨1=1; for x=1, 1∨0=1. Both laws hold for every element of B, so the complement laws (B5) hold.
MCA Online notes are made for reading on screen. Open https://mcastudy.online/mcs-212/boolean-algebra-and-circuits/boolean-algebra-definition-and-examples/ to read this page.