2. Decoder
Discrete quantities of information are represented in digital
systems by binary codes.
A binary code of n bits is capable of representing up to 2n distinct
elements of coded information.
Is a combinational circuit that converts the binary information
from n input lines to a maximum of 2n unique output lines.
If the n-bit coded information has unused combinations, the
decoder may have fewer than 2n outputs.
Called n-to-m-line decode, where m <= 2n minterms of n input
variables.
Decoder
3. Decoder
Inputs = 3.
Outputs = 8 (minterms)
Example
Consider three-to-eight-line decoder circuit
Truth Table
Example:
Binary – to –octal
decoder
ONLY one output can be
active at any time
8. Encoder
Is a digital circuit that performs the inverse operation of a
decoder.
An encoder has 2n (or fewer) input lines and n output lines.
Example
Design an octal-binary encoder
9. Multiplexer
Multiplexer is a combinational circuit that selects a binary
information from one of many input lines and directs it to a single
output line.
The selection of a particular input line is controlled by a set of
selection lines.
• 2n input lines and n selection lines whose bit combinations determine
which input is selected.
Also called a data selector, since it selects one of many inputs and
steers the binary information to the output line.
The size of a multiplexer is specified by the number 2n of its
data input lines and the single output line.
10. Multiplexer
Example
Design a 2 –to-1 line MUX
Data Inputs = 21=1
Selection Input= 1
Output = 1
YS
0
I00
I11
Function Table
15. Digital Circuits
Magnitude Comparator
A magnitude comparator is a combinational circuit that compares two
numbers, A and B, and determines their relative magnitudes. The
outcome of the comparison is specified by three binary variables that
indicate whether A > B, A = B, or A < B.
The comparison of two numbers
◦ outputs: A>B, A=B, A<B
Design Approaches
◦ the truth table
◦ 2
2n
entries - too complex for large n
15