Professional Documents
Culture Documents
Basics of Logic Design: Boolean Algebra, Logic Gates: Computer Science 104
Basics of Logic Design: Boolean Algebra, Logic Gates: Computer Science 104
Administrative
Outline
• Building the building blocks…
• Logic Design
Ø Truth tables, Boolean functions, Gates and Circuits
Reading
• 4.2 of text, but we are going into more detail than the
text
• any other online resource you can find
Application
Top Down Operating
Software
System
Compiler Firmware Interface Between
HW and SW
Instruction Set
CPU Memory I/O system Architecture,
Digital Design Memory, I/O
Circuit Design
Hardware
Bottom UP to CPU
Boolean Algebra
F(A, B, C) = (A * B) + (~A * C)
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
Ø A+A = A
Ø A+0 = A
Ø A+1 = 1
Ø A+~A = 1
Ø A*B = B*A
Ø A*(B+C) = (B+C)*A = A*B + A*C
a b c f1f 2
0 0 0 0 1 f1 = ~a*~b*c + ~a*b*c + a*~b*c + a*b*c
0 0 1 1 1
0 1 0 0 0
0 1 1 1 0
f2 = ~a*~b*~c + ~a*~b*c + a*b*~c + a*b*c
1 0 0 0 0
1 0 1 1 0
1 1 0 0 1
1 1 1 1 1 Simplify these functions...
a b XNOR(a,b)
0 0 1
0 1 0 XNOR = (~a * ~b) + (a * b)
1 0 0
1 1 1
• Example-2:
a b c f1f 2
0 0 0 0 1 f1 = ~a*~b*c + ~a*b*~c + a*~b*~c + a*b*c
0 0 1 1 1
0 1 0 1 0
0 1 1 0 0
f2 = ~a*~b*~c + ~a*~b*c + a*b*~c + a*b*c
1 0 0 1 0
1 1 0 0 1
1 1 1 1 1
Boolean Gates
a XOR(a,b) a NAND(a,b)
b b
a NOR(a,b) a XNOR(a,b)
b b
F
b
Design Example
2. Implement the logic function from problem 1. using only AND,
OR and NOT gates. (Note there are no constraints on the
number of gate inputs.) By implement, I mean draw the circuit
diagram.
4. Implement the logic function from problem 3. using only AND,
OR and NOT gates. (Note there are no constraints on the
number of gate inputs.)
Parity Example
Q3
I1 I0 Q0 Q1 Q2 Q3
Q2 0 0 1 0 0 0
0 1 0 1 0 0
Q1 1 0 0 0 1 0
1 1 0 0 0 1
Q0
I1 I0
a 1
y
MUX(A, B, S) = (A * S) + (B * ~S)
b 0
B
Gate 1
Y = (A * S) + (B * ~S)
Gate 3
A Gate 2
a
b a 3
b 2
y y
c 1
c
d d 0
2
s0 s1
S
DeMorgan’s Laws
• ~(A+B) = ~A * ~B
• ~(A*B) = ~A + ~B
Example: