Analog signals can take on a continuum of values while
Analog vs. Digital Waveforms
Analog Waveform – can take on any voltage value
Voltage
4
Analog Signal
takes on a
Continuum of
Voltage values
5
4
3
2
1
0
Time
Digital Waveform – takes on discrete voltage values
Voltage
5
Example of Digital
Signal taking on two
discrete values
(0 Volts and 5 Volts)
0
Time
digital signals take on only discrete values.
Introduction
Digital Signals
Digital waveforms can be used to represent digital
signals (e.g. 0 or 1, true or false), for example
•0 (false) – represented by 0 Volts
•1 (true) – represented by a small voltage, e.g. 3 Volts
Example of Digital Waveform representing digital
5
signals
3V
0V
Digital signals are represented by a “high” state (1) or “true” state consisting of a small voltage
(e.g. 3V) and “low” state (0) or “false” state consisting of 0 Volts.
True
1 0 0 1 0 1 1 0
False
False
True
False
True
True
False
Time
Introduction
only if both inputs are true (batteries are not dead AND it’s the top of the hour).
Logic Problem Statements
Logic problems have outcomes (or outputs) that depend on events
(or inputs).
For example
• The cuckoo clock makes noise if the batteries are not dead AND it’s the top of
the hour.
• In this example, the output is “the cuckoo clock making noise” and the inputs
are “the batteries are not dead” and “it’s the top of the hour”.
6
Batteries not dead?
Top of the hour?
Decision
Cuckoo clock makes noise?
Box
• Note that in this example, the output is true (cuckoo clock makes noise) if and
• You will see that this decision box can be represented by digital logic using an
AND gate, with the inputs and output being represented by digital signals.
You can think of digital logic gates as decision boxes that solve logic problems.
Introduction
Logic Gates
A digital logic gate is an Integrated Circuit (IC) device that
makes logical decisions based on various combinations of
digital signals presented to it’s inputs.
Digital logic gates can have more than one input signal,
but generally have a single output signal, just like the
decision box on the previous slide.
In the following projects, the input digital signals will be
represented by A and/or B and the output digital signal
will be represented by Q.
7
The next six projects will demonstrate how the output
Input Digital
digital signal is determined by the input digital signals for
various different digital logic gates (NOT gate, AND gate,
Signals
Output Digital
Signal
OR gate, NAND gate, NOR gate, XOR gate).
A
Digital Logic
The remaining projects will demonstrate the input/output
Gate
characteristics of some common combinations of digital
B
logic gates, called digital logic circuits.
Almost all modern electronics such as computers and cellphones use digital logic circuitry.
Q
Project 1: NOT Gate (Inverter)
8
1
0
2
1
3
This circuit demonstrates how the NOT
Gate (U15) works. Turn the slide switch
(S1) on.Connect the loose end of the
A
2
2
U15
1
Q
1
2
1
red wire to either low voltage (denoted
as a “0”) or high voltage (denoted as
“1”).If input A is low (0), then the Q
output will be high (1), and the red LED
(D1) will be on.If input A is high (1),
then the Q output will be low (0) and
NOT gates are used in digital logic circuits to “invert a voltage level”. A high voltage level (1)
into the NOT gate becomes a low voltage level (0) at the output and vice versa.
1
0
9
Project 2: AND Gate
This circuit demonstrates how the AND
2
1
2
3
A
2
B
1
2
1
2
3
Q
U16
1
2
2
2
1
3
1
2
Gate (U16) works. Turn the slide switch
(S1) on. Connect the loose ends of the red
and blackwires to eitherlow voltage
(denotedasa“0”)orhighvoltage
(denoted as a “1”).If, and only if, both
input A AND input B are high (both 1s),
then the Q output will be high (1), and the
red LED (D1) will be on.
A
Q
B
The output of an AND gate is often
representedastheproductofthe
inputs, so Q = AB.
Input (A)Input (B)Output (Q)
000
010
100
111
AND gates are used in digital logic circuits to perform a logical multiply. When one of the inputs is low (0),
the output is low (i.e. multiply by 0). The output will only be high (1) when both inputs are high.
1
0
10
Project 3: OR Gate
2
This circuit demonstrates how the OR Gate
1
2
A
2
B
1
2
1
2
3
Q
2
2
3
(U17) works. Turn the slide switch (S1) on.
Connect the loose ends of the red and
black wires to either low voltage (denoted
as a “0”) or high voltage (denoted as a
U17
“1”). If either input A OR input B are high
1
2
1
(1), then the Q output will be high (1), and
the red LED (D1) will be on.
1
A
Q
B
2
3
TheoutputofanORgate isoften
represented as the sum of the inputs, so
Q = A+B.
Input (A)Input (B)Output (Q)
000
011
101
111
OR gates are used in digital logic circuits to perform a logical add. When one of the inputs is high (1), the
output is high. The output will only be low (0) when both inputs are low.
Project 4: NAND Gate
11
1
0
2
1
3
This circuit demonstrates how the NAND
Gate (U18) works. Turn the slide switch (S1)
on.Connect the loose ends of the red and
2
A
2
B
1
2
U18
1
2
1
black wires to either low voltage (denoted as
a “0”) or high voltage (denoted as a “1”). If
either input A OR input B are low (0), then
the Q output on U18 will be high (1), and the
red LED (D1) will be on. The output logic is
exactly the opposite of the AND gate, hence
3
Q
2
2
1
2
3
1
this gate is called the NOT AND or NAND
Gate.
2
A
Q
B
Input (A)Input (B)Output (Q)
001
011
101
110
NAND gates are used in digital logic circuits to perform an inverted logical multiply. When one of the
inputs is low (0), the output is high. The output will only be low (0) when both inputs are high.
Project 5: NOR Gate
12
1
0
2
1
2
3
A
2
B
1
2
U19
1
2
1
This circuit demonstrates how the NOR Gate
(U19) works. Turn the slide switch (S1) on.
Connect the loose ends of the red and black
wires to either low voltage (denoted as a
“0”) or high voltage (denoted as a “1”).If,
and only if, both input A AND input B are
low (0), then the Q output on U19 will be
high (1), and the red LED (D1) will be on.
3
Q
2
2
1
2
3
1
2
The output logic is exactly the opposite of
the OR gate, hence this gate is called the
NOT OR or NOR Gate.
A
Q
B
Input (A)Input (B)Output (Q)
001
010
100
110
NOR gates are used in digital logic circuits to perform an inverted logical add. When one of the inputs is
high (1), the output is low. The output will only be high (1) when both inputs are low.
Project 6: Exclusive OR (XOR) Gate
2
13
1
0
1
2
A
2
B
1
2
3
This circuit demonstrates how the Exclusive
OR (XOR) Gate (U20) works. Turn the slide
switch (S1) on. Connect the loose ends of
the red and black wires to either low voltage
U20
1
2
1
(denoted as a “0”) or high voltage (denoted
as a “1”).If input A and input B are
exclusive (i.e. different), then the Q output
3
Q
2
2
1
2
3
1
2
on U20 will be high (1), and the red LED (D1)
will be on.
A
Q
B
Input (A)Input (B)Output (Q)
000
011
101
110
XOR gates are used in digital logic circuits to perform a comparison. When the inputs are mutually exclusive
(i.e. different), then the output is high (1). When the inputs are the same, then the output is low (0).
Loading...
+ 29 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.