Basic - Digital - Circuits v7
Basic - Digital - Circuits v7
Basic - Digital - Circuits v7
HIGH Level
LOW Level
Digital Signals
• In Digital Electronics, a number is assigned to each level1:
LOW level = 0
HIGH level = 1
• The signal transition from a level to other is called an edge.
– Positive or rising edge is the transition from “0” to “1”
– Negative or falling edge is the transition from “1” to “0”
HIGH Level
Negative Edge
Positive Edge
LOW Level 1
Using Positive Logic
Codes
• One digital signal is called a bit (binary digit) and can take only
two values {0,1}
• A groups of bits (combinations of “0”s and “1”s), called codes, are
used to represent numbers, letters, symbols, and anything else
required in a given application.
1
Positive Logic
Logic gates. Boolean Algebra
Gates. Boolean Algebra
• Gates or logic gates are the simplest digital circuits. They are the
building block, from which we can build the rest of the digital circuits.
x1 x2 x3 y
Logic symbol of a AND Gate
0 0 0 0
0 0 1 0 x1
0 1 0 0 y
0 1 1 0 xn
1 0 0 0
1 0 1 0 Boolean Operator • : y= x1 • x2 • x3
1 1 0 0 Represents intersection or
1 1 1 1 coincidence
x1 x2 x3 y
Logic symbol of a OR Gate
0 0 0 0
0 0 1 1 x1
0 1 0 1 y
0 1 1 1 xn
1 0 0 1
1 0 1 1 Boolean Operator + : y = x1 + x2 + x3
1 1 0 1 Represents union or existence
1 1 1 1
Operator : y = x
Represents inversion or complementation
NAND y NOR Gates
NAND y NOR Gates: Similar to AND and OR gates, but the output
is inverted.
NAND y= x1 • x2 • x3 NOR y = x1 + x2 + x3
x1 x2 x3 y x1 x2 x3 y
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 0
0 1 0 1 0 1 0 0
0 1 1 1 0 1 1 0
1 0 0 1 1 0 0 0
1 0 1 1 1 0 1 0
1 1 0 1 1 1 0 0
1 1 1 0 1 1 1 0
Output is 0, if all inputs are 1 Output is 0, if any input is 1
XOR y XNOR Gates
XOR y XNOR Gates: Two inputs gates, usually used for comparing
and summing. Their truth tables, symbols and operator are:
XOR y= x1 x2 XNOR y= x1 x2
x1 x2 y
x1 x2 y
0 0 1
0 0 0
0 1 0
0 1 1
1 0 0
1 0 1
1 1 1
1 1 0
x1
y
x2
x3
Gates. Exercise 2
2.- Obtain the boolean expression and the equivalent logic circuit that
implements a basic flight protection circuit with an output FLIGHTOK,
using these variables:
a) BAMAX– it is “1” if the bank angle of the plane θ, is greater than its
maximum defined value, “0” otherwise.
b) BAMIN – it is “1” if bank angle of the plane θ, is less than its
minimum defined value, “0” otherwise.
c) AOAMAX – it is “1” if angle of attack of the plane α, is greater than
its minimum defined value, “0” otherwise.
d) AOAMIN– it is “1” if angle of attack of the plane α, is less than its
maximum defined value, “0” otherwise.
Gates. Exercise 3
3.- Check A-330 emergency generator operation description shown
below:
Tristate buffer
• Tristate buffer: It is a basic logic circuit used to interconnect other circuits.
Basically, it behaves as a switch. If input EN (enable) is active the switch is
ON connecting input and output and producing a “1” or a “0”,otherwise the
switch is OFF, the output is disconnected or in high impedance “Z”.
EN A B EN
EN 0 0 Z
0 1 Z
1 0 0 A B
A B 1 1 1
Gates. Reading schematics
• Signals can be active at “1” or “0”
• AND with different active levels
Physically is:
AND NAND NOR OR
• OR with different active levels
Physically is:
OR NOR NAND AND
• NOT with different active levels
Physically is:
NOT NOT
Physical logic gates
Physical logic gates. Integrated circuits
• Gates are generally fabricated within an integrated circuit. An integrated circuit (IC or
chip) is a set of electronic devices connected on a small piece of silicon (chip or wafer) of
semiconductor material.
VOHmin VIHmin
Basic Parameters of Logic Circuits
4.- Input and output currents
IIH, high-level input current – defines the current flowing through an input
at HIGH
IIL, low-level input current – defines the current flowing through an input
at LOW
IOL, low-level output current – defines the current flowing through an
output at LOW
IOH, high-level output current – defines the current flowing through an
output at HIGH
HIGH LOW
𝑛𝐻=
|
𝐼 𝑂𝐻 ( max )
𝐼 𝐼𝐻 ( max )| |
𝑛𝐿=
𝐼 𝑂𝐿 ( max )
𝐼 𝐼𝐿 ( max ) |
Basic Parameters of Logic Circuits.
5.- Power consumption. Power consumption depends on ICC y VCC
(VDD):
ICCH, supply current when all the outputs are HIGH.
ICCL, supply current when all the outputs are LOW.
z (t 1) f ( x(t ), y (t ))
where :
z - circuit output
x - circuit inputs
y - circuit states
Flip-flops and Latches. Concepts
• Flip-flop and latches are the simplest sequential circuits. They are
just devices able to memorize a bit
• Flip-flops are synchronized by a special signal called clock.
• Latches don’t use clock, they are asynchronous or use an enable
signal.
• There are four type of flip-flops and latches:
– SR latch and flip-flop
– JK flip-flop
– T flip-flop
– D latch and flip-flop
S-R Latches
S-R Latch.
• This latch has two inputs called S(Set) and R(Reset) and two outputs (Q
and not Q(Q). S and R can be considered as commands:
– S: (SET) Set Q to “1” and Q to “0”
– R: (RESET) Set Q to “0” and Q to “1”
S Q
R Q
Implementation
Forbidden
S-R Latch. Active Low Inputs
• The inputs S and R can be active low. Commands are effective
when they are “0”
R S Qt 1 Qt 1
1 1 Qt Qt
S S Q 1 0 1 0
0 1 0 1
R R Q 0 0 X X
Forbidden
S-R Latch. Exercise 1
• Exercise 1: Determine the value of the outputs of a S-R latch with
active high inputs S and R, to which the following waveforms are
applied:
t
R
t
Q
t
BIESTABLES. Set-Reset (SR). Ejercicio
• Exercise 2: Determine the value of the outputs of a S-R latch with
active low inputs S and R, to which the following waveforms are
applied:
t
R
t
Q
t
S-R flip-flops
The Edge-Triggered S-R flip-flop
Edge-triggered flip-flop operates synchronously, only in the instant that the
clock signal transits from “1” to “0” or vice versa.
t
Q
t
The Edge-Triggered S-R flip-flop. Exercise
• Exercise 4: Determine the output waveforms of the flip-flop, if to
its inputs the following waveforms are applied. Assume that Q is
initially “0”.
SET
S Q
CLK
t CLK
S
t R CLR Q
R
t
Q
t
J-K and T flip-flops
The Edge-Triggered JK flip-flop.
These flip-flops behave very similar to S-R. The only difference is that
when boths inputs are “1” it toggles the outputs. If the output was “0” it
becomes “1” and viceversa.
The symbol and truth-table of the (positive) edge-triggered flip-flop are:
J=SET
K=RESET
The Edge-Triggered JK flip-flop.
Ejercicio 5: Determine the output waveforms of the flip-flop, if to its inputs the
following waveforms are applied. Assume that Q is initially “0”.
t
Q
t
The Edge-Triggered T flip-flop
If the input T=0 then outputs do not change, if T=1 outputs toggle.
T CLK Q(t+1)
T
0 ↑ Q(t) No change
1 ↑ Q(t) Toggle
SET
T J Q
CLK
K CLR Q
D flip-flops and latches
D flip-flops and latches
D latch is level synchronized by input EN (enable).
D Q
E Q(t+1)
0 Q(t) No change
E Q
1 D Transparent
D Q
D CLK Q(t+1)
0 0 Each positive
CLK Q edge samples
1 1 the value of the
D input.
Flip-flops asynchronous and
synchronous signals
Aysnchronous and synchronous signals
Flip-flops signals can be classified as synchronous, those which are
synchronized by the clock signal and therefore its operation depends on the
clock.
Please, draw the waveforms that should correspond to the output Qout.
Timing of the flip-flops and latches
Flip-flop and latches timing
To avoid malfunctioning, flip-flops and latches have special timing requirements:
1) Clock, SET and RESET pulses should meet or exceed the minimum width
2) Synchronous signals have to keep a set-up and hold time with respect to clock
signals
3) Clock signals can not exceed a maximum frequency
Example: The propagation delays and minimum widths for asynchronous inputs
Metastabilty!
Flip-flop and latches timing
Set-up time. Synchronous inputs should be stable before the clock active edge
Hold time. Synchronous inputs should be stable after the clock active edge
Propagation delay from clock activation
Metastabilty!
Flip-flop and latches timing
Set-up time. Synchronous inputs should be stable before the clock active edge
Hold time. Synchronous inputs should be stable after the clock active edge
Propagation delay from clock activation
Metastabilty!
An unstable point
of equilibrium
Flip-flop and latches timing
Clock signal parameters:
tw(H) – width of the pulse at HIGH
tw(L) – width of the pulse at LOW
T – clock period
fmax – maximum frequency
Flip-flop and latches timing
Vocabulary. Spanish-English
• Flip-flop. Biestables
• Latches. Cerrojos
• Gates. Puertas
• Edge. Flanco
• Triggered. Disparado o Activado
Where are we?
Levels of Abstraction of Computer Systems.
Programming in
C, C++, Java, Basic,
Pascal…
(high level)
Assembler or
Machine language
(low level)
Interpret instructions
Digital Electronics
ALU, FSM, RG
Pinterest.com