Transcript Lab1
Digital Logic Tutorial and Design
Lab1
Digital Logic Lab
(A mini-lab experience)
• We are going to build both a combination lock
using digital logic devices
• To build these circuits we will draw upon
knowledge or resources developed by several
areas of electrical engineering
• First, we will need to learn a little about digital
logic
Some Definitions
• Definition: Discrete System - a system with a finite number of
sizes or measures
– Shoes, Dresses, Pants, Bolts, Pencils
• Definition: Digital System - a Discrete System with only two
values of system variables: 1 and 0
– True/False; Yes/No; Male/Female; On/Off
• Let’s compare digital and continuous (analog) systems
– Digital signals are binary; analog signals are real-valued numbers
– Digital is less susceptible to noise
Analog Waveform
Voltage (V)
5
Time
0
Digital Waveform
1
1
Voltage (V)
5
0
Time
0
4
Breadboard
• A Breadboard is very useful for trying out new
electronic circuits and for experimentation.
Electronic components and integrated circuit
(IC) chips can be plugged into the small holes
and connected into temporary circuits.
How Does a Breadboard Work
The top row is linked horizontally (for the positive of the
power supply) and the bottom row is also linked horizontally
(for the negative of the power supply).
The remaining holes on the breadboard are connected vertically in columns of five
holes with no link across the gap across the horizontal centre of the breadboard.
AND Operator
• Let’s look at the relationship between the semantic and
logical operator known as the AND operator
• Consider:
If the car is fueled AND the engine works,
then the engine will start
• AND means that both conditions must be true in
order for the conclusion to be true
7
Digital AND
• We can build an electrical device that performs the logical
AND operation on voltage equivalents of logic values
• An AND gate has the
electrical schematic:
A
Inputs
Output
B
For digital logic:
True = 1 is 5 volts
False = 0 is 0 volts
• Practice with the Excel spreadsheet
8
OR Operator
• Another basic operator is the OR
• Consider:
If I have cash OR a credit card,
then I can pay the bill
• OR works such that the output is true, if either of the two inputs is
true
9
NOT Operator/Inverter Gate
• The NOT gate reverses the input
A
• All digital computers are
built using only three gate
types: AND, OR, and NOT
B
NOT Operator
Truth Table
A B
0 1
1 0
10
XOR (Exclusive OR) Operator
• Let’s look at the relationship between the semantic and
logical operator known as the XOR operator
• Consider a biological example:
If gender A XOR gender B,
then reproduction is possible
• XOR works such that output is activated (equal to one) if
both inputs are of a different value
11
Led(light emitting diode)
Led is a semiconductor light source
Red, yellow and green (unlit) LEDs
used in a traffic signal
Chips
• Basic logic chips often come
in 14-pin packages.
• Package sizes and styles vary.
• Pin 1 is indicated with a dot
or half-circle
• Numbers are read counterclockwise from pin 1 (viewed
from the top)
Pin 14
Pin 8
Pin 1
Pin 7
14
Chips
• Chips require a voltage to
function
Pin 14
Pin 8
Pin 1
Pin 7
• Vcc is equal to 5 volts and is
typically pin 14
• Ground is typically pin 7
15
Chips – Specification Sheet
Voltage
The voltage and ground
pins must be connected
for the device to function.
Check the specification
sheet to make sure.
Ground
Diagram from http://www.onsemi.com
16
Chips – Specification Sheet
A
B
C
D
Diagrams from http://www.onsemi.com
17
Wiring a chip
IN
IN
Vcc
OUT
Lab Exercise
Vcc
Probe
18
Lab Exercise
• Using the experimenter’s boards, connect the
circuit provided to you in the following pages.
19
Layout of the SK-10 Experimenter's
Board
20
Layout of the SK-10 Experimenter's
Board
Flat Side
7400
Wires
21
Logic Diagram of Lab
22
Digital Combination Lock
exercise
23
Multi-Input AND Gate
• AND gates can be built with any number of inputs
• Consider the symbol for the 4-input AND gate
A
B
C
D
F
• F is true only when all the inputs are true (1’s)
24
Digital Combination Lock
• Using 3 two-input AND gates, we could build a combination
lock that requires a four-digit code, specifically: 1 1 1 1
1
AND
1
1
AND
1
1
AND
1
1
• The number of inputs could be increased by using more and
more AND gates
25
Digital Combination Lock
• We could build a combination lock that only uses the AND
gate, but that would be of little use since everyone would
know our combination, namely 1 1 1 1
• To build a more interesting combination lock, we will utilize
the NOT (inverter) gate
0
1
26
Digital Combination Lock
• Let’s build a combination lock whose input (key code)
combination is 0 1 1 0
0
1
AND
1
1
AND
1
1
AND
0
1
1
• Is there any other combination that works?
27
“Picking” a Digital Lock
Use the truth table below to record the lock outputs for the different
lock combinations.
Input
Combination
A B C D
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
Lock #1
Lock Output
Lock #2 Lock #3 Lock #4
Lock #5