Chapter 4d Digital System-Adder Encoder Decoder and Mux
Chapter 4d Digital System-Adder Encoder Decoder and Mux
Adders
Basic Adders
Adders are important in
computers
other types of digital systems in which numerical data
are processed
We must know about adders.
The Half-Adder
Basic rule for binary addition.
Question: Obtain Boolean expression for the function f, and simplify it.
2 to 4 Decoder (Active Low)
A combinational logic function that is expressed as a
product of maxterms, therefore, can be implemented
by ANDing decoder outputs. For example, if f(A,B) =
П(0, 1, 3) then f (A,B)= D0 x D1 xD3 so f can be
implemented by the circuit shown in Figure 4.
Example
Example
E=enable
BCD to 7 segment Decoder
One decoder of special interest is a BCD-to-7-
segment decoder. Its purpose is to decode BCD
inputs (the binary codes corresponding to the
decimal values 0 - 9) in order to light the appropriate
segments on a 7- segment display. The decoder,
therefore, will need 7 outputs in order to control the
7 segments, which are labeled a through g. Diagrams
of the decoder and a 7-segment display are shown
below.
The decoder should function as follows:
if ABCD = 0000, the display should light the digit 0 (segments a, b, c, d, e, f)
if ABCD = 0001, the display should light the digit 1 (segments b, c)
if ABCD = 0010, the display should light the digit 2 (segments a, b, d, e, g)
.
.
.
if ABCD = 1001, the display should light the digit 9 (segments a, b, c, f, g)
Note that inputs ABCD = 1010 to ABCD = 1111 correspond to
illegal inputs. The designer may wish to treat these inputs as
“don’t cares” or perhaps generate a blank display or special
unique symbols. If the illegal inputs are treated as “don’t
cares”, the truth table would look as follows:
Example
Implement the function below using a 3:8 decoder.
F = (A’B’) + (A’BC) + AB’C’ *Find truth table of the
Boolean Expression
Example
Encoders
Encoders
An encoder is a combinational logic ckt that
essentially performs a “reverse” decoder function.
An encoder accepts an active level on one of its
inputs representing a digit, such as a decimal or octal
digit, and converts it to a coded output such as BCD
or binary.
Encoders can also be devised to encode various
symbols and alphabetic characters.
The Decimal-to-BCD (Binary
Coded Decimal) Encoder
It has 10 inputs and
4 outputs
corresponding to
the BCD code.
A3 = 8+9
A2 = 4+5+6+7
A1 = 2+3+6+7
A0 = 1+3+5+7+9
The Decimal-to-BCD Encoder
A3 = 8+9
A2 = 4+5+6+7
A1 = 2+3+6+7
A0 = 1+3+5+7+9