SlideShare a Scribd company logo
Boolean
algebra
www.tudorgirba.com
computer
information information
computation
Alan Turing, 1937
George Boole
1815 – 1864
George Boole
1815 – 1864
Claude Shannon
1916 – 2001
02 - Boolean algebra
+
+
a = 0
+
y = 0
a = 0
++
y = 0
a = 0
+
a = 1
+
y = 0
a = 0
+
y = 1
a = 1
+
y = 0
a = 0
+
b = 0
a = 0
+
b = 0
a = 0
y = 0
∧ ba = y
00 0
+
b = 1
a = 0
∧ ba = y
00 0
+
b = 1
a = 0
y = 0
∧ ba = y
00 0
10 0
+
b = 0
a = 1
∧ ba = y
00 0
10 0
+
b = 0
a = 1
y = 0
∧ ba = y
00 0
10 0
01 0
+
b = 1
a = 1
∧ ba = y
00 0
10 0
01 0
+
b = 1
a = 1
y = 1
∧ ba = y
00 0
10 0
01 0
11 1
+
b = x
a = 0
∧ ba = y
00 0
10 0
01 0
11 1
+
b = x
a = 0
y = 0
∧ ba = y
00 0
10 0
01 0
11 1
x0 0
+
b = x
a = 1
∧ ba = y
00 0
10 0
01 0
11 1
x0 0
+
b = x
a = 1
y = x
∧ ba = y
00 0
10 0
01 0
11 1
x0 0
x1 x
+
b = x
a = x
∧ ba = y
00 0
10 0
01 0
11 1
x0 0
x1 x
+
b = x
a = x
y = x
∧ ba = y
00 0
10 0
01 0
11 1
x0 0
x1 x
xx x
+
a = 0 b = 0
+
a = 0 b = 0
y = 0
∨ ba = y
00 0
+
a = 0 b = 1
∨ ba = y
00 0
+
a = 0 b = 1
y = 1
∨ ba = y
00 0
10 1
+
a = 1 b = 0
∨ ba = y
00 0
10 1
+
a = 1 b = 0
y = 1
∨ ba = y
00 0
10 1
01 1
+
a = 1 b = 1
∨ ba = y
00 0
10 1
01 1
+
a = 1 b = 1
y = 1
∨ ba = y
00 0
10 1
01 1
11 1
+
a = 0 b = x
∨ ba = y
00 0
10 1
01 1
11 1
+
a = 0 b = x
y = x
∨ ba = y
00 0
10 1
01 1
11 1
x0 x
+
a = 1 b = x
∨ ba = y
00 0
10 1
01 1
11 1
x0 x
+
a = 1 b = x
y = 1
∨ ba = y
00 0
10 1
01 1
11 1
x0 x
x1 1
+
a = x b = x
∨ ba = y
00 0
10 1
01 1
11 1
x0 x
x1 1
+
a = x b = x
y = x
∨ ba = y
00 0
10 1
01 1
11 1
x0 x
x1 1
xx x
+
∨ ba = y
00 0
10 1
01 1
11 1
∧ ba = y
00 0
10 0
01 0
11 1
Conjunction (AND) Disjunction (OR)
∨ ba = y
00 0
10 1
01 1
11 1
∧ ba = y
00 0
10 0
01 0
11 1
?
Conjunction (AND) Disjunction (OR)
a = 0
a = 0
y = 1
a =¬ y
0 1
a = 1
a =¬ y
0 1
a = 1
y = 0
a =¬ y
0 1
1 0
∨ ba = y
00 0
10 1
01 1
11 1
∧ ba = y
00 0
10 0
01 0
11 1
a =¬ y
0 1
1 0
Conjunction (AND) Disjunction (OR) Negation (NOT)
¬ a
a ∧ b
a ∨ b
- a
a * b
a + b
¬ a
a ∧ b
a ∨ b
- a
a * b
a + b
¬ a
a ∧ b
a ∨ b
! a
a & b
a | b
- a
a * b
a + b
¬ a
a ∧ b
a ∨ b
! a
a & b
a | b
NOT
OR
AND
- a
a * b
a + b
¬ a
a ∧ b
a ∨ b
! a
a & b
a | b
NOT
OR
AND
02 - Boolean algebra
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 0 = 0
a ∨ 1 = 1
Zero elements
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 0 = 0
a ∨ 1 = 1
Zero elements
a ∧ a = a
a ∨ a = a
Idempotence
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 0 = 0
a ∨ 1 = 1
Zero elements
a ∧ a = a
a ∨ a = a
Idempotence
a ∧ ¬ a = 0
a ∨ ¬ a = 1
Negation
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 0 = 0
a ∨ 1 = 1
Zero elements
a ∧ a = a
a ∨ a = a
Idempotence
a ∧ ¬ a = 0
a ∨ ¬ a = 1
Negation
a ∨ b = b ∨ a
a ∧ b = b ∧ a
Commutativity
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 0 = 0
a ∨ 1 = 1
Zero elements
a ∧ a = a
a ∨ a = a
Idempotence
a ∧ ¬ a = 0
a ∨ ¬ a = 1
Negation
a ∨ b = b ∨ a
a ∧ b = b ∧ a
Commutativity
a ∧ (b ∧ c) = (a ∧ b) ∧ c
a ∨ (b ∨ c) = (a ∨ b) ∨ c
Associativity
a ∧ 1 = a
a ∨ 0 = a
Neutral elements
a ∧ 0 = 0
a ∨ 1 = 1
Zero elements
a ∧ a = a
a ∨ a = a
Idempotence
a ∧ ¬ a = 0
a ∨ ¬ a = 1
Negation
a ∨ b = b ∨ a
a ∧ b = b ∧ a
Commutativity
a ∧ (b ∧ c) = (a ∧ b) ∧ c
a ∨ (b ∨ c) = (a ∨ b) ∨ c
Associativity
a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)
a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)
Distributivity
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
De Morgan (1806 – 1871)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b)
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
0
1
0
0
0
DeMorgan’s laws
NAND
NOR
a ∧ 1 = a a ∨ b = b ∨ a
a ∨ 0 = a
a ∧ 0 = 0
a ∨ 1 = 1
a ∧ a = a
a ∨ a = a
a ∧ ¬ a = 0
a ∨ ¬ a = 1
Neutral elements
Zero elements
Idempotence
Negation
a ∧ (b ∧ c) = (a ∧ b) ∧ c
a ∧ b = b ∧ a
a ∨ (b ∨ c) = (a ∨ b) ∨ c
a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)
a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)
¬ (a ∧ b) = (¬ a) ∨ (¬ b)
¬ (a ∨ b) = (¬ a) ∧ (¬ b)
Commutativity
Associativity
Distributivity
DeMorgan’s
02 - Boolean algebra
≠ ba = y
00 0
10 1
01 1
11 0
Exclusive OR (XOR)
≠ ba = y
00 0
10 1
01 1
11 0
Exclusive OR (XOR)
ba = y
00 1
10 1
01 0
11 1
Implication
≠ ba = y
00 0
10 1
01 1
11 0
Exclusive OR (XOR)
ba = y
00 1
10 1
01 0
11 1
ba = y
00 1
10 0
01 0
11 1
Implication Equivalence
≠ ba = y
00 0
10 1
01 1
11 0
Exclusive OR (XOR)
ba = y
00 1
10 1
01 0
11 1
ba = y
00 1
10 0
01 0
11 1
Implication Equivalence
∨ ba = y
00 0
10 1
01 1
11 1
∧ ba = y
00 0
10 0
01 0
11 1
Conjunction (AND) Disjunction (OR)
a =¬ y
0 1
1 0
Negation (NOT)
≠ ba = y
00 0
10 1
01 1
11 0
Exclusive OR (XOR)
ba = y
00 1
10 1
01 0
11 1
ba = y
00 1
10 0
01 0
11 1
Implication Equivalence
∨ ba = y
00 0
10 1
01 1
11 1
∧ ba = y
00 0
10 0
01 0
11 1
Conjunction (AND) Disjunction (OR)
a =¬ y
0 1
1 0
Negation (NOT)
4 3 3
3 2 1
Tautology
f = 1 (a ∧ (a b)) b
Contradiction
f = 0 a ∧ (¬ a)
Satisfiable
f = 1 sometimes a b
How many basic boolean functions
with 2 parameters are possible?
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
0000 y0 = 0
0001 y1 = a ∧ b
0010 y2 = a ∧ ¬ b
0011 y3 = a
0100 y4 = ¬ a ∧ b
0101 y5 = b
0110 y6 = a ≠ b
0111 y7 = a ∨ b
How many basic boolean functions
with 2 parameters are possible?
0011
0101
a
b
1111 y15 = 1
1110 y14 = ¬ a ∨ ¬ b
1101 y13 = ¬ a ∨ b
1100 y12 = ¬ a
1011 y11 = a ∨ ¬ b
1010 y10 = ¬ b
1001 y9 = a b
1000 y8 = ¬ a ∧ ¬ b
How to create a half adder?
How to create a half adder?
+ ba = co
00 0
10 0
01 0
11 1
q
0
1
1
0
How to create a half adder?
a
b
q
co
+ ba = co
00 0
10 0
01 0
11 1
q
0
1
1
0
AND
XOR
How to create a full adder?
How to create a full adder?
+ ba = co
00 0
10 0
01 0
11 1
q
0
1
1
0
ci +
0
0
0
0
1
1
1
1
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
1
How to create a full adder?
+ ba = co
00 0
10 0
01 0
11 1
q
0
1
1
0
ci +
0
0
0
0
1
1
1
1
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
1
Full
adder
a b
coci
q
How to create a full adder?
Full
adder
a b
coci
q
How to create a full adder?
Full
adder
a b
coci
q
Full
adder
a b
coci
q
Full
adder
a b
coci
q
Tudor Gîrba
www.tudorgirba.com
creativecommons.org/licenses/by/3.0/

More Related Content

PDF
The Visual Terminator
PDF
Object-Oriented Metrics in Practice
PDF
Presenting with text
PDF
boolean.pdf
PPTX
digital logic circuits, digital component
PPTX
B.sc cs-ii-u-1.5 digital logic circuits, digital component
PPTX
Bca 2nd sem-u-1.5 digital logic circuits, digital component
PPT
2-Boolean-Algebra.ppt logic and computer design fundamental
The Visual Terminator
Object-Oriented Metrics in Practice
Presenting with text
boolean.pdf
digital logic circuits, digital component
B.sc cs-ii-u-1.5 digital logic circuits, digital component
Bca 2nd sem-u-1.5 digital logic circuits, digital component
2-Boolean-Algebra.ppt logic and computer design fundamental

Similar to 02 - Boolean algebra (20)

PPTX
Digital electronics basic overview .pptx
PDF
boolean-algebra.pdf
PPTX
B sc cs i bo-de u-ii logic gates
PPT
5. Combinational Circuits_P1 lecturee of dld
PPT
Boolean Algebra
PPT
Best Explanation about De Morgan's Law and Components
PPT
IntroductiontoDigitalElectronics IntroductiontoDigitalElectronics
PPT
LCDF4_Chap_02_P1 computer engineering.ppt
PPT
LCDF3_Chaaaaaaaaaaaaaaaaaaaaap_02_P1.ppt
PPT
digital logic tutorial combinational logic
PPT
LCDF3_Chap_02_P1.ppt Digital Login Design
PPT
Boolean Algebra and Logic gates ( Chapter 2)
PDF
digital logic design Chapter 2 boolean_algebra_&_logic_gates
PDF
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
PPT
Boolean algebra And Logic Gates
PPT
102_2_digitalSystem_Chap_2_part_1.ppt
PDF
12 - Overview
PPT
Boolean_Algebra and digital circuits .ppt
PPT
booleanalgebra-140914001141-phpapp01 (1).ppt
PDF
Lect 2 boolean algebra (4 5-21)
Digital electronics basic overview .pptx
boolean-algebra.pdf
B sc cs i bo-de u-ii logic gates
5. Combinational Circuits_P1 lecturee of dld
Boolean Algebra
Best Explanation about De Morgan's Law and Components
IntroductiontoDigitalElectronics IntroductiontoDigitalElectronics
LCDF4_Chap_02_P1 computer engineering.ppt
LCDF3_Chaaaaaaaaaaaaaaaaaaaaap_02_P1.ppt
digital logic tutorial combinational logic
LCDF3_Chap_02_P1.ppt Digital Login Design
Boolean Algebra and Logic gates ( Chapter 2)
digital logic design Chapter 2 boolean_algebra_&_logic_gates
ESTUDO DE ALGEBRA BOOLEANA PARA ESTUDOS.
Boolean algebra And Logic Gates
102_2_digitalSystem_Chap_2_part_1.ppt
12 - Overview
Boolean_Algebra and digital circuits .ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
Lect 2 boolean algebra (4 5-21)
Ad

More from Tudor Girba (20)

PDF
Beyond software evolution: Software environmentalism
PDF
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
PDF
GT Spotter
PDF
Don't demo facts. Demo stories! (handouts)
PDF
Don't demo facts. Demo stories!
PDF
Humane assessment on cards
PDF
Underneath Scrum: Reflective Thinking
PDF
1800+ TED talks later
PDF
Software assessment by example (lecture at the University of Bern)
PDF
Humane assessment: Taming the elephant from the development room
PDF
Moose: how to solve real problems without reading code
PDF
Software Environmentalism (ECOOP 2014 Keynote)
PPTX
The emergent nature of software systems
PDF
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
PDF
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
PDF
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
PDF
Demo-driven innovation teaser
PDF
Software assessment essentials (lecture at the University of Bern 2013)
PDF
Demo-driven innovation (University of Zurich, June 2013)
PDF
Humane assessment with Moose at GOTO Aarhus 2011
Beyond software evolution: Software environmentalism
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
GT Spotter
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories!
Humane assessment on cards
Underneath Scrum: Reflective Thinking
1800+ TED talks later
Software assessment by example (lecture at the University of Bern)
Humane assessment: Taming the elephant from the development room
Moose: how to solve real problems without reading code
Software Environmentalism (ECOOP 2014 Keynote)
The emergent nature of software systems
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Demo-driven innovation teaser
Software assessment essentials (lecture at the University of Bern 2013)
Demo-driven innovation (University of Zurich, June 2013)
Humane assessment with Moose at GOTO Aarhus 2011
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf
MYSQL Presentation for SQL database connectivity
The Rise and Fall of 3GPP – Time for a Sabbatical?
Assigned Numbers - 2025 - Bluetooth® Document
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
gpt5_lecture_notes_comprehensive_20250812015547.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation

02 - Boolean algebra

  • 5. George Boole 1815 – 1864 Claude Shannon 1916 – 2001
  • 7. +
  • 9. + y = 0 a = 0
  • 10. ++ y = 0 a = 0
  • 11. + a = 1 + y = 0 a = 0
  • 12. + y = 1 a = 1 + y = 0 a = 0
  • 13. +
  • 14. b = 0 a = 0 +
  • 15. b = 0 a = 0 y = 0 ∧ ba = y 00 0 +
  • 16. b = 1 a = 0 ∧ ba = y 00 0 +
  • 17. b = 1 a = 0 y = 0 ∧ ba = y 00 0 10 0 +
  • 18. b = 0 a = 1 ∧ ba = y 00 0 10 0 +
  • 19. b = 0 a = 1 y = 0 ∧ ba = y 00 0 10 0 01 0 +
  • 20. b = 1 a = 1 ∧ ba = y 00 0 10 0 01 0 +
  • 21. b = 1 a = 1 y = 1 ∧ ba = y 00 0 10 0 01 0 11 1 +
  • 22. b = x a = 0 ∧ ba = y 00 0 10 0 01 0 11 1 +
  • 23. b = x a = 0 y = 0 ∧ ba = y 00 0 10 0 01 0 11 1 x0 0 +
  • 24. b = x a = 1 ∧ ba = y 00 0 10 0 01 0 11 1 x0 0 +
  • 25. b = x a = 1 y = x ∧ ba = y 00 0 10 0 01 0 11 1 x0 0 x1 x +
  • 26. b = x a = x ∧ ba = y 00 0 10 0 01 0 11 1 x0 0 x1 x +
  • 27. b = x a = x y = x ∧ ba = y 00 0 10 0 01 0 11 1 x0 0 x1 x xx x +
  • 28. a = 0 b = 0 +
  • 29. a = 0 b = 0 y = 0 ∨ ba = y 00 0 +
  • 30. a = 0 b = 1 ∨ ba = y 00 0 +
  • 31. a = 0 b = 1 y = 1 ∨ ba = y 00 0 10 1 +
  • 32. a = 1 b = 0 ∨ ba = y 00 0 10 1 +
  • 33. a = 1 b = 0 y = 1 ∨ ba = y 00 0 10 1 01 1 +
  • 34. a = 1 b = 1 ∨ ba = y 00 0 10 1 01 1 +
  • 35. a = 1 b = 1 y = 1 ∨ ba = y 00 0 10 1 01 1 11 1 +
  • 36. a = 0 b = x ∨ ba = y 00 0 10 1 01 1 11 1 +
  • 37. a = 0 b = x y = x ∨ ba = y 00 0 10 1 01 1 11 1 x0 x +
  • 38. a = 1 b = x ∨ ba = y 00 0 10 1 01 1 11 1 x0 x +
  • 39. a = 1 b = x y = 1 ∨ ba = y 00 0 10 1 01 1 11 1 x0 x x1 1 +
  • 40. a = x b = x ∨ ba = y 00 0 10 1 01 1 11 1 x0 x x1 1 +
  • 41. a = x b = x y = x ∨ ba = y 00 0 10 1 01 1 11 1 x0 x x1 1 xx x +
  • 42. ∨ ba = y 00 0 10 1 01 1 11 1 ∧ ba = y 00 0 10 0 01 0 11 1 Conjunction (AND) Disjunction (OR)
  • 43. ∨ ba = y 00 0 10 1 01 1 11 1 ∧ ba = y 00 0 10 0 01 0 11 1 ? Conjunction (AND) Disjunction (OR)
  • 44. a = 0
  • 45. a = 0 y = 1 a =¬ y 0 1
  • 46. a = 1 a =¬ y 0 1
  • 47. a = 1 y = 0 a =¬ y 0 1 1 0
  • 48. ∨ ba = y 00 0 10 1 01 1 11 1 ∧ ba = y 00 0 10 0 01 0 11 1 a =¬ y 0 1 1 0 Conjunction (AND) Disjunction (OR) Negation (NOT)
  • 49. ¬ a a ∧ b a ∨ b
  • 50. - a a * b a + b ¬ a a ∧ b a ∨ b
  • 51. - a a * b a + b ¬ a a ∧ b a ∨ b ! a a & b a | b
  • 52. - a a * b a + b ¬ a a ∧ b a ∨ b ! a a & b a | b NOT OR AND
  • 53. - a a * b a + b ¬ a a ∧ b a ∨ b ! a a & b a | b NOT OR AND
  • 55. a ∧ 1 = a a ∨ 0 = a Neutral elements
  • 56. a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements
  • 57. a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements a ∧ a = a a ∨ a = a Idempotence
  • 58. a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements a ∧ a = a a ∨ a = a Idempotence a ∧ ¬ a = 0 a ∨ ¬ a = 1 Negation
  • 59. a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements a ∧ a = a a ∨ a = a Idempotence a ∧ ¬ a = 0 a ∨ ¬ a = 1 Negation a ∨ b = b ∨ a a ∧ b = b ∧ a Commutativity
  • 60. a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements a ∧ a = a a ∨ a = a Idempotence a ∧ ¬ a = 0 a ∨ ¬ a = 1 Negation a ∨ b = b ∨ a a ∧ b = b ∧ a Commutativity a ∧ (b ∧ c) = (a ∧ b) ∧ c a ∨ (b ∨ c) = (a ∨ b) ∨ c Associativity
  • 61. a ∧ 1 = a a ∨ 0 = a Neutral elements a ∧ 0 = 0 a ∨ 1 = 1 Zero elements a ∧ a = a a ∨ a = a Idempotence a ∧ ¬ a = 0 a ∨ ¬ a = 1 Negation a ∨ b = b ∨ a a ∧ b = b ∧ a Commutativity a ∧ (b ∧ c) = (a ∧ b) ∧ c a ∨ (b ∨ c) = (a ∨ b) ∨ c Associativity a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) Distributivity
  • 62. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) DeMorgan’s laws NAND NOR
  • 63. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 64. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 65. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 66. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 67. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 68. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 69. De Morgan (1806 – 1871) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) a b a ∨ b ¬ (a ∨ b) ¬ a ¬ b (¬ a) ∧ (¬ b) 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 DeMorgan’s laws NAND NOR
  • 70. a ∧ 1 = a a ∨ b = b ∨ a a ∨ 0 = a a ∧ 0 = 0 a ∨ 1 = 1 a ∧ a = a a ∨ a = a a ∧ ¬ a = 0 a ∨ ¬ a = 1 Neutral elements Zero elements Idempotence Negation a ∧ (b ∧ c) = (a ∧ b) ∧ c a ∧ b = b ∧ a a ∨ (b ∨ c) = (a ∨ b) ∨ c a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c) a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c) ¬ (a ∧ b) = (¬ a) ∨ (¬ b) ¬ (a ∨ b) = (¬ a) ∧ (¬ b) Commutativity Associativity Distributivity DeMorgan’s
  • 72. ≠ ba = y 00 0 10 1 01 1 11 0 Exclusive OR (XOR)
  • 73. ≠ ba = y 00 0 10 1 01 1 11 0 Exclusive OR (XOR) ba = y 00 1 10 1 01 0 11 1 Implication
  • 74. ≠ ba = y 00 0 10 1 01 1 11 0 Exclusive OR (XOR) ba = y 00 1 10 1 01 0 11 1 ba = y 00 1 10 0 01 0 11 1 Implication Equivalence
  • 75. ≠ ba = y 00 0 10 1 01 1 11 0 Exclusive OR (XOR) ba = y 00 1 10 1 01 0 11 1 ba = y 00 1 10 0 01 0 11 1 Implication Equivalence ∨ ba = y 00 0 10 1 01 1 11 1 ∧ ba = y 00 0 10 0 01 0 11 1 Conjunction (AND) Disjunction (OR) a =¬ y 0 1 1 0 Negation (NOT)
  • 76. ≠ ba = y 00 0 10 1 01 1 11 0 Exclusive OR (XOR) ba = y 00 1 10 1 01 0 11 1 ba = y 00 1 10 0 01 0 11 1 Implication Equivalence ∨ ba = y 00 0 10 1 01 1 11 1 ∧ ba = y 00 0 10 0 01 0 11 1 Conjunction (AND) Disjunction (OR) a =¬ y 0 1 1 0 Negation (NOT) 4 3 3 3 2 1
  • 77. Tautology f = 1 (a ∧ (a b)) b Contradiction f = 0 a ∧ (¬ a) Satisfiable f = 1 sometimes a b
  • 78. How many basic boolean functions with 2 parameters are possible?
  • 79. How many basic boolean functions with 2 parameters are possible?
  • 80. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 81. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 82. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 83. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 84. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 85. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 86. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 87. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 88. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 89. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 90. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 91. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 92. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 93. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 94. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 95. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 96. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 97. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible?
  • 98. 0011 0101 a b 0000 y0 = 0 0001 y1 = a ∧ b 0010 y2 = a ∧ ¬ b 0011 y3 = a 0100 y4 = ¬ a ∧ b 0101 y5 = b 0110 y6 = a ≠ b 0111 y7 = a ∨ b How many basic boolean functions with 2 parameters are possible? 0011 0101 a b 1111 y15 = 1 1110 y14 = ¬ a ∨ ¬ b 1101 y13 = ¬ a ∨ b 1100 y12 = ¬ a 1011 y11 = a ∨ ¬ b 1010 y10 = ¬ b 1001 y9 = a b 1000 y8 = ¬ a ∧ ¬ b
  • 99. How to create a half adder?
  • 100. How to create a half adder? + ba = co 00 0 10 0 01 0 11 1 q 0 1 1 0
  • 101. How to create a half adder? a b q co + ba = co 00 0 10 0 01 0 11 1 q 0 1 1 0 AND XOR
  • 102. How to create a full adder?
  • 103. How to create a full adder? + ba = co 00 0 10 0 01 0 11 1 q 0 1 1 0 ci + 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1
  • 104. How to create a full adder? + ba = co 00 0 10 0 01 0 11 1 q 0 1 1 0 ci + 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 Full adder a b coci q
  • 105. How to create a full adder? Full adder a b coci q
  • 106. How to create a full adder? Full adder a b coci q Full adder a b coci q Full adder a b coci q