Digital Electronics: Engs 31 / Cosc 56
Digital Electronics: Engs 31 / Cosc 56
DIGITAL ELECTRONICS
Day 3
Today: Wednesday:
Basic electronics, logic circuits Combinational logic blocks
(§§2.1-2.3, 2.8) (§§2.7-2.10)
3.1
DeMorgan’s laws
Y = AB: Both A and B must be true to make Y true.
Either A or B can be false to make Y false: ( AB )’ = A’ + B’
Augustus DeMorgan
(1806-1871)
2.2
Proof of DeMorgan’s Law (2 Variables)
A B AB (AB)’ A’ B’ A’+B’
0 0
0 1
1 0
1 1
3.3
Measures of logical complexity
Literals: gate inputs, wires
2.4
Example
We want to implement this logical function
Y = A’B + BC + AB’
2.5
Example (2)
Sometimes DeMorgan’s law allows further simplification:
Y = A’B + BC + AB’
2.6
Example (3) — Implementation
(A’ + BC)•(AC’ + B) +
AB’
7 gates, 8 literals, 4 levels
2.7
Canonical forms for logic expressions
Sum-of-products (SOP) — also called disjunctive normal form
f(A,B) = (A’+B’)(A+B)
2.8
Example — PAL16L8 programmable SOP array
16 input/output pins, 8 AND-OR functions (half shown here)
Simplify the logic equation to a sum of products form with as few terms
as possible.
2.10
Exercise
A logic function to be implemented
n X Y Z P
0 0 0 0 1
1 0 0 1 1
2 0 1 0 1
3 0 1 1 1
4 1 0 0 0
5 1 0 1 1
6 1 1 0 0
7 1 1 1 1
2.11
Canonical forms for logic expressions
Sum-of-products (SOP) — also called disjunctive normal form
f(A,B) = (A’+B’)(A+B)
I
3.13
Switching theory (1938)
Combinations of switches can be described
by Boolean algebra.
A=TRUE closes switch
A•B A´
3.15
Relay logic
A relay is an electrically-controlled switch.
NOT function
When current flows through the
relay coil, the contacts open and
the current ceases to flow to the
lamp.
3.16
Relay logic
AND function
OR function
f(A,B) = ?
3.17
First binary adder (1937)
Built at Bell Telephone
Laboratories, from surplus
telephone relays.
3.18
The first computer bug (1945)
3.21
More basic electronics
All materials (except superconductors) resist the flow of current.
Resistance measured in ohms (W).
3.23
Power dissipation in electronics
P = I2R
http://xkcd.com/643/
3.24
How a transistor works
An MOS transistor is a voltage-controlled resistor.
3.25
CMOS logic circuits
An MOS transistor is a voltage-controlled resistor.
3.26
Complementary MOS (CMOS) inverter
If Vin is HIGH
s
g Upper (PMOS) transistor is off, lower
“pull-up”
(NMOS) transistor is on Vout is LOW
d
d
g
“pull-down” If Vin is LOW
s
Upper transistor on, lower transistor off
Vout is HIGH
3.28
Representing ‘1’s and ‘0’s by voltages
Bad idea: vulnerable to noise
‘1’
VDD/2
‘0’
0V
‘0’ ‘0’
G1 G2
‘1’
VIH
Invalid range
VIL
‘0’
VOL
‘0’
0V 0V
• G2 still reads it
as a ‘0’
‘0’
‘0’
G1 G2
VDD VDD
‘1’
VOH
‘1’
Noise margin
VIH
VIL
Noise margin
‘0’
VOL
‘0’
0V 0V
VDD
Iout
Vin = 0V Some other circuit (load)
+
Vout
VDD
RONp
IOH
Vin = 0V Some other circuit
+
Vout = VOH
-
Ref: Prof K. Odame, Engs 32 3.35
Output low current drive
Lower (nMOS) transistor sinks current when output is low.
IOL
Vin = VDD Some other circuit
+
RONn
Vout = VOL
6.37
More electronics — capacitance
Charging a capacitor — basic RC circuit
6.38
Capacitance causes propagation delay
Equivalent circuit:
First circuit’s transistor outputs act like
resistors to +5 V and ground.
6.39
Power consumption
Transistors are “leaky”: small amounts of current are always flowing to ground,
dissipating heat in resistance ⇒ static power
It takes energy to charge or discharge a capacitor: CV2/2 (joules) every time a circuit
switches. If a circuit cycles low-high-low every T (seconds), then energy is used at a
rate CV2/T = fCV2 (watts) ⇒ dynamic power
6.40
Propagation delay
Gate inputs (pMOS and nMOS transistors) have parasitic capacitance, which
must be charged by the driving circuit.
Vout reaches its final value when load capacitances are charged ⟹ propagation
delay.
The more loads (fanout), the more capacitance, the higher the delay.
Consult data sheet for values of propagation delay, tPLH, tPHL
Vin Vout
2.44
How to read a data sheet (Part 3)
2.45
More CMOS logic circuits
Identify the functions.
A B Y A B Y
L L L L
L H L H
H L H L
H H H H
3.46
CMOS AND gate
AND is really a “NOT NAND”
NAND NOT
3.47
Efficient implementation of SOP form
Begin with the AND-OR circuit
Size comparison:
AND-OR: 18 transistors
NAND: 12 transistors
Speed comparison:
AND-OR: 4 levels (NAND-
NOT-NOR-NOT)
NAND: 2 levels
3.49
Moore’s Law (1965)—more transistors per chip
3.53
Moore’s Law: Transistors keep getting smaller
http://www.intel.com/technology/mooreslaw/index.htm?iid=tech_as+rhc_moore
Wavelength of red (laser pointer) light is
635 nm.
3.54
Summary
Bits are manipulated by logical AND, OR, and NOT operations, and
more complex operations built from AND, OR, and NOT.
3.57