








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









Introduction to Computer Science • Sedgewick and Wayne • Copyright © 2007 • http://www.cs.Princeton.EDU/IntroCS
George Boole (1815 – 1864) Claude Shannon (1916 – 2001)
2
analog: signals vary continuously
5
power
connection
6
13
n
AND truth table
14
truth table for all Boolean functions of 2 variables
y
x
y
x
truth table for all Boolean functions of 2 variables
y
y'
x'
x
every 4-bit value represents one
some functions of 3 variables
z
y
x 0 0 0 0 0
every 4-bit value represents one
every 8-bit value represents one
every 2
n -bit value represents one
x'
Expressing XOR Using AND, OR, NOT
y
x'y
x'y + xy'
xy'
y'
x XOR y
x
x' NOT x
x AND y x y
x OR y
notation meaning
x + y
17
x'yz
expressing MAJ using sum-of-products
x y z MAJ xy'z xyz' xyz
x'yz + xy'z + xyz' + xyz
proves that { AND , OR , NOT }
are universal
18
25
26
x'y'z
Expressing ODD using sum-of-products
x y z ODD x'yz' xy'z' xyz
x'y'z + x'yz' + xy'z' + xyz
29
30
x
1
x
2
x
3
x
0
y
1
y
2
y
3
y
0
z
1
z
2
z
3
z
0
256+
1
2
3
0
1
2
3
0
1
2
3
0
4-bit adder truth table
y 2
y 3 0 0 0 0 1. 1
x 0
x 1 0 0 0 0 0. 1
x 2
x 3 0 0 0 0 0. 1
y 0
y 1 0 1 0 1 0. 1
z 2
z 3 0 0 0 0 1. 1
z 0
z 1 0 1 0 1 0. 1
8+ = 512 rows!
c 0 0 0 0 0 0. 1
in
out
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
carry bit
c
i
c
i+
y
i
x
i 0 0 0 1 0 1 1 1
summand bit
c
i
z
i
y
i
x
i 0 1 1 0 1 0 0 1
out
37
38
41
42
43
Introduction to Computer Science • Sedgewick and Wayne • Copyright © 2007 • http://www.cs.Princeton.EDU/IntroCS
49
adder
xor
shifter
50
16-bit words for TOY memory
Copyright 2006, Sidney Harris, http://www.sciencecartoonsplus.com/