Untitled
Untitled
Logical Circuits
Combinational circuit
Consists of logical gates whose outputs at any time are
determined from only the present combination of inputs
Sequential circuit
Employ storage elements in addition to logic gates. Their
outputs are a function of the inputs and the state of the
storage elements (a function of previous inputs).
Combinational Circuits (Cont.)
A combinational circuit also can be described by m
Boolean functions, one for each output variable. Each
output function is expressed in terms of the n input
variables.
Analysis Procedure
The analysis of a combinational circuit requires that
we determine the function that the circuit
implements.
First step, make sure that the circuit is combinational
and not sequential
No feedbacks, or memory elements
Obtain the Boolean functions or the Truth table
Analysis Procedure
Example
3 binary inputs: A, B, C
2 binary outputs: F1, F2
Analysis Procedure
Get
Then
then
Analysis Procedure
Procedure for obtaining the truth table directly from
the logic diagram without going through the
derivations of the Boolean functions.
Design Procedure
Design Procedure
Design Procedure
Code Conversion Example
Input BCD
Output Excess-3 Code
Design Procedure
K-Maps
Design Procedure
Logic Gates
Design
Procedure
Logic Diagram
Binary Adder-Subtractor
Sum (S), Carry (C)
Half adder
A combinational circuit that performs the addition of
two bits.
Full adder
A combinational circuit that performs the addition of
three bits (two significant bits and a previous carry).
In this chapter, the half adder design is carried out
first, from which we develop the full adder.
Connecting n full adder in cascade produces a binary
adder for two n-bit numbers.
Half Adder
Full Adder
S could be also implemented with two half adders and
one OR gate
Binary Adder
0
Binary Adder (Cont.)
If the four-bit binary adder is designed by the
classical method.
9 inputs (4As + 4Bs + C0)
Truth table needs 29 = 512 entries
However, using the iterative method of cascading a
standard function, it is possible to obtain a simple and
straightforward implementation
Carry Propagation
The longest propagation delay time in an adder is the
time it takes the carry to propagate through the full
adders.
If there are four full adders in the adder, the output
carry C4 would have 2×4=8 gate levels from C0 to C4.
For an n-bit adder, there are 2n gate levels for the
carry to propagate from input to output.
The carry propagation time is an important attribute
of the adder because it limits the speed with which
two numbers are added.
Carry Propagation (Cont.)
Since all other arithmetic operations are implemented
by successive additions, the time consumed during
the addition process is critical.
An obvious solution for reducing the carry
propagation delay time is to employ faster gates with
reduced delays.
However, physical circuits have a limit to their
capability.
Another solution is to increase the complexity of the
equipment in such a way that the carry delay time is
reduced.
The most widely used technique employs the principle
of carry lookahead logic.
Carry Lookahead Logic
Pi and Gi
Let
the leftmost bit represents the sign and negative numbers are
in the 2’s complement form, the carry does not indicate an
overflow
Overflow (Cont.)
Overflow may occur if the two numbers added are both positive or
both negative
Cannot occur if one number is positive and the other is negative
Exclusive-NOR
The unequal outputs can use the same gates that are needed to
generate the equal output.
Four-bit magnitude comparator
Decoder
Convert n inputs to a maximum of 2n unique output
n-to-m-line decoder, m ≦ 2n
3-to-8 decoder
seven output 0, one output 1
Decoders constructed with NAND gates
Include enable inputs to control the circuit operation
Example, one output 0, other output 1
Demultiplexer
A decoder with enable input can function as a
demultiplexer
Demultiplexer receives a signal from a line and directs
it to one of 2n possible output lines
the selection of a specific output is controlled by the bit
combination of n selection lines
1-to-4-line demultiplexer
E is the data input line
A, B are the selection input lines
e.g., AB=10, output D2 is the same as the E
A decoder with an enable input is referred to as a
decoder-demultiplexer
Decoders with enable inputs can be connected to form
a larger decoder
e.g., two 3-to-8-line decoders → 4-to-16-line decoder
In general, enable inputs are a convenient feature for
interconnecting two or more standard components for
the purpose of combining them into a similar function
with more inputs and outputs.
Combinational Logic Implementation
Decoder provides the 2n minterms of n inputs variables
Any Boolean function can be expressed in sum of
minterms
Any combinational circuit with n inputs and m outputs
can be implemented with an n-to-2n-line decoder and
m OR gates
A function with a long list of minterms requires an OR
gate with a large number of inputs.
A function having a list of k minterms can be expressed
in its complemented form F’ with 2n-k minterms.
If the number of minterms in the function is greater
than 2n/2, then F’ can be expressed with fewer
minterms.
In such a case, it is advantageous to use a NOR gate to
sum the minterms of F’. The output of the NOR gate
complements this sum and generates the normal
output F.
If NAND gates are used for the decoder, as in Figure
4.19, then the external gates must be NAND gates
instead of OR gates. This is because a two-level NAND
gate circuit implements a sum-of-minterms function
and is equivalent to a two-level AND-OR circuit.
Full Adder
Encoder
Inverse operation of a decoder
2n (or fewer) inputs and n outputs
Example, octal-to-binary encoder (only one input is 1)
Has the limitation that only one input can be active at any
given time. If two inputs are active simultaneously, the
output produces an undefined combination.
To resolve this ambiguity, encoder circuits must establish an input
priority to ensure that only one input is encoded.
Another ambiguity in the octal-to-binary encoder is that an
output with all 0’s is generated when all the inputs are 0; but
this output is the same as when D0 is equal to 1.
This discrepancy can be resolved by providing one more output to
indicate whether at least one input is equal to 1.
Priority Encoder
V, valid input
The higher the subscript number, the higher the
priority of the input
Multiplexers
Select binary data from one of many inputs and directs
it to a single output
Selection of a particular input is controlled by a set of
selection lines. Normally, there are 2n input lines and n
selection lines.
Example, 2-to-1-line multiplexer
4-to-1-line multiplexer
Quadruple 2-to-1-line Multiplexer
Provide multiple-bit selection logic
Boolean Function Implementation
A multiplexer is essentially a decoder that includes the
OR gate within the unit.
Using a multiplexer with n-1 selection inputs to
implement a boolean function of n variables.
The first n-1 variables of the function are connected to
the selection inputs of the multiplexer and the
remaining single variable of the function is used for the
data inputs.
Example