Digital Electronics
Digital Electronics
Digital Electronics
Digital Signals
Digital Signals have two basic states: 1 (logic high, or H, or on) 0 (logic low, or L, or off) Digital values are in a binary format. Binary means 2 states. A good example of binary is a light (only on or off)
128 + 0 + 0 + 16 + 8 + 4 + 0 + 0 = 156
Binary
In Binary, there are only 0s and 1s. These numbers are called Base-2 ( Example: 010 )
2
Base 2 = Base 10
Binary to Decimal
We count in Base-10 (0 to 9)
Binary as a Voltage
Voltages are used to represent logic values:
A voltage present (called Vcc or Vdd) = 1 Zero Volts or ground (called gnd or Vss) = 0
A Simple Switch
Here is a simple switch used to provide a logic value:
Vcc Vcc, or 1 Vcc Gnd, or 0
Digital Logic
Basic Digital logic is based on 3 primary functions (the basic gates):
AND OR NOT
If this input AND this input are high, the output is high
Inputs
Output
10
Inputs
Output
11
Inputs
Output
12
Inputs
Output
13
Input 0 0 1 1 0 1 0 1
Output 0 0 0 1
AND Function
14
AND Gates
It is possible to have AND gates with more than 2 inputs. The same logic rules apply if any input
15
The OR function
The OR function:
if any input is high, the output is high if all inputs are low, the output is low
16
OR Logic Symbol
Inputs
Output
17
OR Logic Symbol
0 0
Determine the output
Inputs
Output
Animated Slide
18
OR Logic Symbol
0 1
Determine the output
Inputs
Output
Animated Slide
19
OR Logic Symbol
1 1
Determine the output
Inputs
Output
Animated Slide
20
OR Truth Table
Truth Table
Input 0 0 1 1 0 1 0 1 Output 0 1 1 1
OR Function
21
The output is the opposite state of the input The NOT function is often called INVERTER
22
Input
Output
23
Input
1
Determine the output
Output
Animated Slide
24
Input
0
Determine the output
Output
Animated Slide
25
NOT Function
26
Combinational Logic
A circuit that utilizes more that 1 logic function has Combinational Logic. As an example, if a circuit has an AND gate connected to an Inverter gate, this circuit has combinational logic.
27
Combinational logic
How would your describe the output of this combinational logic circuit?
28
NAND Gate
The NAND gate is the combination of an NOT gate with an AND gate.
29
Combinational logic
How would your describe the output of this combinational logic circuit?
30
NOR gate
The NOR gate is the combination of the NOT gate with the OR gate.
31
32
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
34
Chips
Chips require a voltage to function Vcc is equal to 5 volts and is typically pin 14 Ground is typically pin 7
Pin 14 Pin 8
Pin 1
Pin 7
35
The voltage and ground pins must be connected for the device to function. Check the specification sheet to make sure.
Ground
36
A B C
D
37
Wiring a chip
IN Vcc IN OUT
Vcc
Probe
38
NAND
Y A B
NOR
Y Y=A+B A 0 0 1 1 B 0 1 0 1 Y 1 0 0 0 A B
XNOR
Y Y=A+B A 0 0 1 1 B 0 1 0 1 Y 1 0 0 1
Exclusive OR
Exclusive OR What lay people mean by or Symbol is
Plus in a circle
40
Others
41
AND4
Y
Y = ABCD A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Y 0 0 0 0 0 0 0 1
NAND is Universal
Can express any Boolean Function Equivalents below
43
45
Representation: Schematic
46
F = X + YZ
2n rows: where n # of variables
47
What is Noise?
Anything that degrades the signal
E.g., resistance, power supply noise, coupling to neighboring wires, etc.
Example: a gate (driver) could output a 5 volt signal but, because of resistance in a long wire, the signal could arrive at the receiver with a degraded value, for example, 4.5 volts
Noise Driver 5V
48
Receiver 4.5 V
Noise Margins
Driver Receiver
VDD
Input Characteristics Logic High Input Range Forbidden Zone VIH VIL Logic Low Input Range
NMH
VO L
NML
GND
Identities
Use identities to manipulate functions You can use distributive law
X + YZ = ( X + Y )( X + Z )
to transform from
to
F = X + YZ
F = ( X + Y )( X + Z )
52
Table of Identities
53
Duals
Left and right columns are duals Replace AND and OR, 0s and 1s
55
Commutativity
Operation is independent of order of variables
56
Associativity
Independent of order in which we group
XYZ
X +Y + Z
Distributivity
58
DeMorgans Theorem
Used a lot NOR invert, then AND
59
60
Algebraic Manipulation
Consider function
F = XYZ + XYZ + XZ
61
Simplify Function
F = XYZ + XYZ + XZ
Apply
F = XY ( Z + Z ) + XZ
Apply
F = XY 1 + XZ
Apply
F = XY + XZ
62
F = XY + XZ
Fewer Gates
63
Consensus Theorem
XY + XZ + YZ = XY + XZ
The third term is redundant
Can just drop
Proof summary:
For third term to be true, Y & Z both must be 1 Then one of the first two terms is already 1!
64
Standard Forms
Definitions:
Product terms AND BZ Sum terms OR X + This is logical product and sum, not arithmetic
65
Definition: Minterm
Product term in which all variables appear once (complemented or not)
66
Number of Minterms
For n variables, there will be 2n minterms Like binary numbers from 0 to 2n-1 Often numbered same way (with decimal conversion)
67
Maxterms
Sum term in which all variables appear once (complemented or not)
68
m j = Mj
Example
m3 = XYZ = X + Y + Z = M 3
69
Sum of Minterms
OR all of the minterms of truth table row with a 1
ON-set minterms
F Y X+Z Z = Z YX X X X+ ZY Y Y + + Z
70
Sum of Products
Simplifying sum-of-minterms can yield a sum of products Difference is each term need not be a minterm
i.e., terms do not need to have all variables
71
Two-Level Implementation
Sum of products has 2 levels of gates
72
73
Complement of a Function
Definition: 1s & 0s swapped in truth table Mechanical way to derive algebraic form
Take the dual
Recall: Interchange AND and OR, and 1s & 0s
74
Complement of F
Not surprisingly, just sum of the other minterms
OFF-set minterms
In this case m1 + m3 + m4 + m6
75
Product of Maxterms
Recall that maxterm is true except for its own case So M1 is only false for 001
76
Product of Maxterms
Can express F as AND of all rows that should evaluate to 0
F = M1 M 3 M 4 M 6
or
F = ( X + Y + Z )( X + Y + Z ) ( X + Y + Z )( X + Y + Z )
77
Product of Sums
Result: another standard form ORs followed by AND
Terms do not have to be maxterms
F = X (Y + Z )( X + Y + Z )
78