#04-2020-1002-104 lecture2 combinational logical circuits i · what is a logic gate? • a basic...
TRANSCRIPT
![Page 1: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/1.jpg)
28.05.20 14:48
CSCI 150 Introduction to Digital and Computer
System Design Lecture 2: Combinational Logical Circuits I
Jetic Gū2020 Summer Semester (S2)
![Page 2: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/2.jpg)
Overview• Focus: Boolean Algebra
• Architecture: Combinatory Logical Circuits
• Textbook v4: Ch2 2.1 2.2; v5: Ch2 2.1 2.2
• Core Ideas:
1. Logical Gates
2. Introduction to LogicWorks
![Page 3: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/3.jpg)
Logic Gates
Summary
P1 Logic Gates
And, Or, Not Gates, LogicWorks
![Page 4: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/4.jpg)
What is a Logic Gate?
• A basic circuit unit implemented using transistors and interconnections
• We when analysing a digital circuit, are not concerned with the internals of a gate, but only it’s external properties
• Performs a single logical operationoperate on one or more binary input signals to produce an output signal
Concep
t
P1 Logic Gates
![Page 5: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/5.jpg)
What is a Logic Gate?
Concep
t
P1 Logic Gates
• Similar to in electric circuit design, we are not concerned with the design of the lightbulb or battery, but we know what it does.
• A logic gate is like that, we know it’s external logic properties, that’s enough.
![Page 6: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/6.jpg)
First 3 Gates
Concep
t
P1 Logic Gates
Z = X ⋅ YXY
Z = X + YXY
Z = XX
AND Gate
OR Gate
NOT Gate
Input Output
![Page 7: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/7.jpg)
AND Operator and Boolean Algebra / Binary Logic
Concep
t
P1 Logic Gates
Z = X ⋅ YXY
• AND: is equal to AND
• Operator: (\cdot)
Z X Y
⋅
• Boolean Algebra
• Each variable can only have one of two values:
• TRUE/ON/1
• False/OFF/0
![Page 8: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/8.jpg)
AND Operator and Boolean Algebra
Concep
t
P1 Logic Gates
Z = X ⋅ YXY
AND Truth Table
0 0 0
0 1 0
1 0 0
1 1 1
Z = X ⋅ YYX
• AND: is equal to AND
• Operator: (\cdot)
Z X Y
⋅
• Truth Table
• Left: all combinations of input values
• Right: corresponding output values
![Page 9: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/9.jpg)
OR Operator
Concep
t
P1 Logic Gates
OR Truth Table
0 0 0
0 1 1
1 0 1
1 1 1
Z = X + YYX• OR: is equal to or
• Operator:
Z X Y
+
Z = X + YXY
![Page 10: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/10.jpg)
NOT Operator
Concep
t
P1 Logic Gates
OR Truth Table
0 1
1 0
Z = XX
• NOT: is equal to NOT
• Operator: (\overline{X})
• Also called: Complement operation; Inverter gate
Z X
X
Z = XX
![Page 11: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/11.jpg)
Logic Gate and Boolean Algebra
• Logic Gates
• AND Gate, OR Gate, NOT Gate
• Actual physical components
Concep
t
P1 Logic Gates
• Boolean Algebra Operators
• AND ( ), OR ( ), NOT ( )
• Mathematical Representations
⋅ + X
THEY HAVE DIFFERENCES!
![Page 12: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/12.jpg)
Digital Logical Gates• In math, everything happens simultaneously
• An equation like doesn’t change with time/location
• In digital circuits, we have electrons as 'messengers'. They travel at about 2,200 kilometres per second
• Logic gates are tiny circuits, which means they still have internal components: even slower
• This means: there will be tiny delays called Gate Delay
250 + 760 = 1010
Tech
nical
P1 Logic Gates
![Page 13: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/13.jpg)
Digital Logical Gates
Tech
nical
P1 Logic Gates
Timing Diagram
Z = X ⋅ YXY
1
X1
Y1
0 1 2 3 4 5
Z
0 1 0 1 0
0 0 1 1 0
transition transition
![Page 14: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/14.jpg)
Digital Logical Gates
Tech
nical
P1 Logic Gates
Timing Diagram (IDEAL)
Z = X ⋅ YXY
1
X1
Y1
0 1 2 3 4 5
Z
0 1 0 1 0
0 0 1 1 0
1
![Page 15: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/15.jpg)
Digital Logical Gates
Tech
nical
P1 Logic Gates
Timing Diagram (REALITY)
Z = X ⋅ YXY
1
X1
Y1
0 1 2 3 4 5
Z
0 1 0 1 0
0 0 1 1 0
1 Gate delay tG
![Page 16: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/16.jpg)
Gate Delay
Tech
nical
P1 Logic Gates
• Gate delay are small, but not ignorable in practice
• for simulation, you can ignore it for now
• Gate delay differs for different types and implementations of Gates
![Page 17: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/17.jpg)
Simulation 1
Example
P1 Logic Gates
Truth Table
0 0
0 1
1 0
1 1
XY Z
ZYX = (X ⋅ Y) + (X + Y)
![Page 18: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/18.jpg)
Simulation 1
Example
P1 Logic Gates
Truth Table
0 0 0
0 1 1
1 0 1
1 1 1
XY Z
ZYX = (X ⋅ Y) + (X + Y)
![Page 19: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/19.jpg)
Simulation 2
Example
P1 Logic Gates
Truth Table
0 0 00 1 01 0 01 1 00 0 10 1 11 0 11 1 1
Z
YF
X
FYX = (XY) + (XZ)Z
![Page 20: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/20.jpg)
Simulation 2
Example
P1 Logic Gates
Truth Table
0 0 0 00 1 0 11 0 0 01 1 0 00 0 1 00 1 1 11 0 1 11 1 1 1
Z
YF
X
FYX = (XY) + (XZ)Z
![Page 21: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/21.jpg)
Simulation 3
Example
P1 Logic Gates
Truth Table
0 0 00 1 01 0 01 1 00 0 10 1 11 0 11 1 1
Z
Y
F
X
FYX = XYZ + XYZ + XZZ
![Page 22: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/22.jpg)
Simulation 3
Example
P1 Logic Gates
Truth Table
0 0 0 00 1 0 11 0 0 01 1 0 00 0 1 00 1 1 11 0 1 11 1 1 1
Z
Y
F
X
FYX = XYZ + XYZ + XZZ
![Page 23: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/23.jpg)
Summary
• AND, OR, NOT Operators
• Logic Gates
• Timing diagram
• Truth Table
• Gate Delay
Review
P1 Logic Gates
![Page 24: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/24.jpg)
LogicWorks
Summary
P2 Tutorial
Fire up your computer please!
![Page 25: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/25.jpg)
Demo
P2 Tutorial
1. Open LogicWorks, Create new circuit diagram
![Page 26: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/26.jpg)
Tech
nical
P2 Tutorial
1. This is the main interface
![Page 27: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/27.jpg)
Tech
nical
P2 Tutorial
1. Select Simulation IO from the Parts Palette
![Page 28: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/28.jpg)
Tech
nical
P2 Tutorial
1. Pay Attention to Binary Probe and Binary Switch
![Page 29: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/29.jpg)
Tech
nical
P2 Tutorial
1. Double click and place one of each on the main board
![Page 30: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/30.jpg)
Tech
nical
P2 Tutorial
1. Use the 'Draw Signal' tool to connect the two parts
![Page 31: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/31.jpg)
Tech
nical
P2 Tutorial
1. Switch back to the Cursor mode, now click on the switch and you can change the signal value
![Page 32: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/32.jpg)
Tech
nical
P2 Tutorial
1. Select Simulation Gates
![Page 33: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/33.jpg)
Tech
nical
P2 Tutorial
1. Select AND-2, then complete the above diagram
![Page 34: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/34.jpg)
Tech
nical
P2 Tutorial
1. Select Clock from Simulation IO, then replace the lower Binary Switch with it. A Clock is a device that generates a 1 at a certain frequency
![Page 35: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/35.jpg)
Tech
nical
P2 Tutorial
1. Select Clock from Simulation IO, then replace the lower Binary Switch with it
![Page 36: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/36.jpg)
Tech
nical
P2 Tutorial
1. Right click the Red Wire, select Name
![Page 37: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/37.jpg)
Tech
nical
P2 Tutorial
1. Complete the diagram like above, then click Reset Simulation
![Page 38: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/38.jpg)
Tech
nical
P2 Tutorial
1. Use the Simulation Panel to control the speed of simulation, then you will see the Timing Diagram!
![Page 39: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/39.jpg)
Exe 1• Curtain Motor Control
• Button1: 1 when user wants to open the curtain
• Button2: 1 when user wants to close the curtain
• Output1: 1 to make the motor open the curtain
• Output2: 1 to make the motor close the curtain
• Light: motor is active
Exerci
se
P2 Tutorial
• When both buttons are pressed, motors do nothing
![Page 40: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/40.jpg)
Exe 2• Curtain Motor Control
• Sensor1: 1 when curtain is fully closed
• Sensor2: 1 when curtain is fully open
• Button1: 1 when user wants to open the curtain
• Button2: 1 when user wants to close the curtain
• Output1: 1 to make the motor open the curtain
• Output2: 1 to make the motor close the curtain
• Light: motor is active
Exerci
se
P2 Tutorial
• Stop the motor when the curtain is already fully opened/closed
![Page 41: #04-2020-1002-104 Lecture2 Combinational Logical Circuits I · What is a Logic Gate? • A basic circuit unit implemented using transistors and interconnections • We when analysing](https://reader033.vdocuments.net/reader033/viewer/2022060311/5f0af2117e708231d42e1d5f/html5/thumbnails/41.jpg)
Summary
• Simulation in LogicWorks
• Binary Probe / Binary Switch in LogicWorks
• Gates in LogicWorks
• Clocks in LogicWorks
• Timing Diagram in LogicWorks
Review
P2 Tutorial