Professional Documents
Culture Documents
Combinational Logic
Instructor: Justin Hsia
Teaching Assistants:
Andrea Dang Ethan Coffey
Hafsa Khan Jason Li
Tilboon Elberier Yui Suzuki
L1: Combinational Logic CSE369, Winter 2022
❖ TAs:
Course Motivation
❖ Electronics an increasing part of our lives
▪ Computers & phones
▪ Vehicles (cars, planes)
▪ Robots
▪ Portable & household electronics
+3.3 +3.3
Volts
Volts
1 0 1
0 Time 0 Time
Digital: Analog:
Discrete set of possible values Values vary over a continuous
range
Binary (2 values):
On, 3.3 V, high, TRUE, "1"
Off, 3.0 V, low, FALSE, "0"
4
L1: Combinational Logic CSE369, Winter 2022
7
L1: Combinational Logic CSE369, Winter 2022
Lecture Outline
❖ Course Logistics
❖ Combinational Logic Review
❖ Combinational Logic in the Lab
8
L1: Combinational Logic CSE369, Winter 2022
Bookmarks
❖ Canvas: https://canvas.uw.edu/courses/1515293
▪ Schedule, materials (Files), calendar, grade book
❖ Discussion: https://edstem.org/us/courses/16387/
▪ Announcements made here
▪ Ask and answer questions – staff will monitor and contribute
❖ Gradescope: https://www.gradescope.com/courses/340158
▪ Lab submissions, quizzes(?)
Grading
❖ Labs (66%)
▪ 6 regular labs – 1 week each
• Labs 1-4: 60 points each, Labs 5-7: 100 points each
▪ 1 “final project” – 2 weeks
• Lab 8 Check-In: 10 points, Lab 8: 150 points
Labs
❖ Lab Hours: Wed & Thu 2:30-5:20 pm (CSE 003)
❖ Each student will get a lab kit for the quarter
▪ Lab kit picked up (?) from CSE 003 next week
▪ Install software on laptop (Windows or VM)
❖ Labs are combination of report + demo
▪ Submit via Gradescope Wednesdays before 2:30 pm
• This is before your demo
▪ 10-minute demos done in lab sections (sign-up process)
❖ Penalties on lab submissions and demos:
Lateness < 24 hr < 48 hr < 72 hr ≥ 72 hr
Penalty 10% 30% 60% 100%
11
L1: Combinational Logic CSE369, Winter 2022
Collaboration Policy
❖ Labs and project are to be completed individually
▪ Goal is to give every student the hands-on experience
▪ Violation of these rules is grounds for failing the class
❖ OK:
▪ Discussing lectures and/or readings, studying together
▪ High-level discussion of general approaches
▪ Help with debugging, tools peculiarities, etc.
❖ Not OK:
▪ Developing a lab together
▪ Giving away solutions or having someone else do your lab
for you
12
L1: Combinational Logic CSE369, Winter 2022
Course Workload
❖ The workload (3 credits) ramps up significantly
towards the end of the quarter:
CSE 369 Lab Hours (2018)
12
10
Average Hours Spent
0
1 2 3 4 5 6 7 8 9
Lecture Outline
❖ Course Logistics
❖ Combinational Logic Review
❖ Combinational Logic in the Lab
14
L1: Combinational Logic CSE369, Winter 2022
15
L1: Combinational Logic CSE369, Winter 2022
▪ Logic Gates
❖ Truth Table
❖ Boolean Expression
16
L1: Combinational Logic CSE369, Winter 2022
17
L1: Combinational Logic CSE369, Winter 2022
Truth Tables
❖ Table that relates the inputs to a combinational logic
(CL) circuit to its output
▪ Output only depends on current inputs
▪ Use abstraction of 0/1 instead of high/low voltage
▪ Shows output for every possible combination of inputs
(“black box” approach)
CL General Form
A
B
Y
C F
D
A B Out
0 0 0
AND 0
1
1 0
0 0
1 1 1
A B Out
0 0 0
OR 0
1
1 1
0 1
1 1 1
20
L1: Combinational Logic CSE369, Winter 2022
A B Out
0 0 1
NOR 0
1
1 0
0 0
1 1 0
A B Out
0 0 0
XOR 0
1
1 1
0 1
1 1 0
21
L1: Combinational Logic CSE369, Winter 2022
Boolean Algebra
❖ Represent inputs and outputs as variables
▪ Each variable can only take on the value 0 or 1
❖ Overbar is NOT: “logical complement”
▪ If A is 0, then A
ഥ is 1 and vice-versa
❖ Plus (+) is 2-input OR: “logical sum”
❖ Product (·) is 2-input AND: “logical product”
❖ All other gates and logical expressions can be built
from combinations of these
▪ e.g., A XOR B = A ⊕ B = AB
ഥ +B
ഥA
23
L1: Combinational Logic CSE369, Winter 2022
▪ Take rows with 0’s in output column, product the sum of the
complements of the inputs
▪ C= A+B ⋅ A ഥ+B ഥ
24
L1: Combinational Logic CSE369, Winter 2022
❖ X+1=1 ❖ X⋅0=0
❖ X+X=X ❖ X⋅X=X
❖ ഥ=1
X+X ❖ ഥ=0
X⋅X
❖
ഥ=X
X
25
L1: Combinational Logic CSE369, Winter 2022
❖ Associative Law:
X+(Y+Z) = (X+Y)+Z X⋅ Y⋅Z = X⋅Y ⋅Z
❖ Distributive Law:
X⋅(Y+Z) = X⋅Y+X⋅Z X+YZ = (X+Y)⋅(X+Z)
26
L1: Combinational Logic CSE369, Winter 2022
❖ XY + Xഥ
Y =X
❖ X+ഥ
XY =X+Y
❖ X X+Y =X
❖ X+Y X+ഥ
Y =X
❖ X ഥ
X+Y = XY
27
L1: Combinational Logic CSE369, Winter 2022
Practice Problem
❖ Boolean Function: F = ഥ
XYZ + XZ
Truth Table: Simplification:
X Y Z F =ഥXYZ + Xഥ YZ + XYZ
0 0 0
0 0 1
=ഥXYZ + XZ
0 1 0 = ഥXY + X Z
0 1 1 = X+Y Z Which of these
1 0 0 is “simpler”?
1 0 1 = XZ + YZ
1 1 0
1 1 1
28
L1: Combinational Logic CSE369, Winter 2022
29
L1: Combinational Logic CSE369, Winter 2022
Lecture Outline
❖ Course Logistics
❖ Combinational Logic Review
❖ Combinational Logic in the Lab
30
L1: Combinational Logic CSE369, Winter 2022
31
L1: Combinational Logic CSE369, Winter 2022
❖ Faster hardware?
▪ Fewer inputs implies faster gates in some technologies
▪ Fan-ins (# of gate inputs) are limited in some technologies
▪ Fewer levels of gates implies reduced signal propagation
delays
▪ # of gates (or gate packages) influences manufacturing costs
▪ Simpler Boolean expressions → smaller transistor networks
→ smaller circuit delays → faster hardware
32
L1: Combinational Logic CSE369, Winter 2022
DeMorgan’s Law
NOR NAND
X Y ഥ
X ഥ
Y ഥ⋅Y
X+Y X ഥ X⋅Y Xഥ+Y
ഥ
0 0 1 1 1 1
❖ X+Y= ഥ
X⋅ഥ
Y 0 1 1 0 0 1
❖ X⋅Y =ഥ
X+ഥ
Y 1 0 0 1 0 1
1 1 0 0 0 0
❖ In Boolean Algebra, converts between AND-OR and OR-AND
expressions
▪ Z=A ഥB
ഥC + AഥBC + ABഥC
▪ Zത = A + B + Cത ⋅ A + B
ഥ + Cത ⋅ A
ഥ + B + Cത
❖ At gate level, can convert from AND/OR to NAND/NOR gates
▪ “Flip” all input/output bubbles and “switch” gate
⟺ ⟺
34
L1: Combinational Logic CSE369, Winter 2022
35
L1: Combinational Logic CSE369, Winter 2022
1 14 Vdd (TRUE)
2 13
Pins 12
(both sides) 3
4 11
5 10
6 9
GND (False) 7 8
(4)
C F
7 nets (wires) in this design
37
L1: Combinational Logic CSE369, Winter 2022
B A B
A
(from
SW1
and
SW2)
F
(to
LED1)
C
C F (from
SW3)
VCC
GND
38
L1: Combinational Logic CSE369, Winter 2022
Summary
❖ Digital systems are constructed from Combinational
and Sequential Logic
❖ Logic minimization to create
Try all input combinations
smaller and faster hardware
❖ Gates come in TTL
This is difficult to
packages that require Circuit do efficiently! Truth
Diagram Table
careful wiring
Boolean
Expression
39