Computer Architect
Computer Architect
Computer Architect
Functions
• Computers take inputs and produce outputs, just like functions in
math!
An expression is A function table is
finite but not unique unique but infinite
f(x,y) = 2x + y x y f(x,y)
=x+x+y 0 0 0
= 2(x + y/2) … … …
2 2 6
= ... … … …
23 41 87
… … …
Result: x y xy x y x+y x x’
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
3
10/18/2023
Expression:
(xy)’, or
(x + y)’ or 𝑥 + 𝑦 xy
(xy)’, or 𝑥𝑦
Result: x y (xy)’ x y (x+y)’ x y xy
0 0 1 0 0 1 0 0 0
0 1 1 0 1 0 0 1 1
1 0 1 1 0 0 1 0 1
1 1 0 1 1 0 1 1 0
4
10/18/2023
X X’ X X’
LOW(0) HIGH(1)
HIGH(1) LOW(0)
Example waveforms:
X
X’
The inverter performs the Boolean NOT operation. When the input is
LOW, the output is HIGH; when the input is HIGH, the output is LOW.
The AND gate produces a HIGH output when all inputs are HIGH;
otherwise, the output is LOW. For a 2-input gate, the truth table is
Example waveforms:
A B X
A
0 0 0
B 0 1 0
1 0 0
X 1 1 1
9
10/18/2023
The OR gate A X
B
The OR gate produces a HIGH output if any input is HIGH; if all inputs
are LOW, the output is LOW. For a 2-input gate, the truth table is
Example waveforms: A B X
A
0 0 0
B
0 1 1
1 0 1
X 1 1 1
Logic Gates
Logic Gates
1 AND 0 = 0 1 OR 0 = 1
20
10
10/18/2023
Logic Gates
Logic Gates
• Another very useful gate is the exclusive OR (XOR)
gate.
• The output of the XOR operation is true only when
the values of the inputs differ.
21
Logic Gates
Logic Gates
1 XOR 0 = 1 1 XOR 1 = 0
22
11
10/18/2023
Logic Gates
Logic Gates
• NAND and NOR are
two very important
gates. Their
symbols and truth
tables are shown at
the right.
23
Logic Gates
Logic Gates
• NAND and NOR are
known as universal
gates because they are
inexpensive to
manufacture, and any
Boolean function can be
constructed using only
NAND or only NOR
gates.
• NAND and NOR gates
require only 2 transistors
• AND and OR gates
need 3 transistors!
24
12
10/18/2023
Logic Gates
Logic Gates
• Gates can have multiple inputs and more than one
output.
• A second output can be provided for the complement
of the operation.
• We’ll see more of this later.
26
13
10/18/2023
Digital Components
Logic Gates and Circuit
• The main thing to remember is that combinations of
gates implement Boolean functions.
• Any Boolean function can be converted into a circuit in a
relatively straightforward way.
• The circuit below implements the Boolean function:
27
14
10/18/2023
• The first 11 axioms are easy to see from these truth tables alone.
For example, x + x’ = 1 because of the middle two lines below
(where y = x’)
32
16
10/18/2023
18
10/18/2023
Simplification
• 1. Simplification the following expressions:
• F=C + BC
• F=(A + B) (A + C)
F (V + W + X )(V + X + Y )(V + Z )
Solution of problem 2
L.H.S.=(V+X+W)(V+X+Y)(V+Z)
=[(V+X)+W(V+X)+Y(V+X)+WY](V+Z)
=[(V+X)(1+W+Y)+WY](V+Z)
=(V+X+WY)(V+Z)
This can be implemented by two OR gates and two
AND gate.
38
19
10/18/2023
Simplification
• Sum-of-Product
• Minterm
• Product-of-Sum
• Maxterm
Minterms
• Consider variables A and B
• Assume that they are somehow combined with AND
operator
• There are 4 possible combinations
AB, A' B, AB ' , A' B '
• Each of those terms is called a minterm (standard product)
• In general, if there are n variables, there are 2
minterms- exactly equal number of rows in truth table
40
20
10/18/2023
Exercise
• List the minterms for 3 variables
A B C Minterm Designation
0 0 0 A ' B ' C' m0
0 0 1 A'B'C m1
0 1 0 A ' B C' m2
0 1 1 A'B C m3
1 0 0 A B ' C' m4
1 0 1 A B'C m5
1 1 0 A B C' m6
1 1 1 A B C m7
41
Maxterms
• Consider variables A and B
• Assume that they are somehow combined with OR
operator
• There are 4 possible combinations
A + B, A' + B, A + B' , A' + B '
42
21
10/18/2023
Exercise
• List the maxterm for 3 variables
A B C Maxterm Designation
0 0 0 A+B+C M0
0 0 1 A+B+C' M1
0 1 0 A+B'+C M2
0 1 1 A+B'+C' M3
1 0 0 A'+B+C M4
1 0 1 A'+B+C' M5
1 1 0 A'+B'+C M6
1 1 1 A'+B'+C' M7
Sum-of-Products
• When two or more product terms are summed by Boolean
addition, the resulting expression is a sum-of-product (SOP).
• An SOP expression can contain a single variable term.
• In an SOP expression, a single overbar (complement) cannot
extend over more than one variable.
𝐴𝐵 + 𝐶𝐷 𝐸 + 𝐴𝐶 𝐸 YES
𝐴𝐵𝐶 + 𝐴𝐵 𝐶 + 𝐴𝐵𝐶 YES
(𝐴 + 𝐵)𝐶𝐷 + 𝐸𝐹 NO
𝐴 + 𝐵 + 𝐶 + 𝐷 𝐸 + (𝐴𝐶) NO
44
22
10/18/2023
Sum-of-Products (SOP)
• Implementation of an SOP Expression simply requires
ORing the outputs of two or more AND gates.
23
10/18/2023
Example
• Convert the following Boolean expression into standard SOP form:
• 𝐴𝐵 𝐶+ 𝐴 𝐵 + 𝐴𝐵𝐶
Product-of-Sums (POS)
• When two or more sum terms are multiplied, the
resulting expression is a product-of-sum (POS).
• A POS expression can contain a single variable term.
• In a POS expression, a single overbar (complement)
cannot extend over more than one variable.
( A + B)(C + D) + EF NO
48
24
10/18/2023
Product-of-Sums (POS)
• Implementation of a POS Expression simply requires
ANDing the outputs of two or more OR gates.
49
25
10/18/2023
Example
• Convert the following Boolean expression into standard POS form:
• (𝐴 + 𝐵 + 𝐶 )(𝐵 + 𝐶)(𝐴 + 𝐵 + 𝐶 )
• Solution: Domain of expression is A,B,C
• 𝐵 + 𝐶 = AA + B + C = (A + B + C)(A + B + C)
26
10/18/2023
27