Unit V - Decoders To Adders
Unit V - Decoders To Adders
Decoders
ENABLE inputs
• Some decoders have one or more enable inputs that are used to
control the
operation of the decoder
• common ENABLE line connected as a fourth input of each gate
• With this ENABLE line held HIGH, the decoder will function normally
• With ENABLE held LOW, however, all of the outputs will be forced to
the
LOW state regardless of the levels at the A, B, C inputs
3X8 Decoder
3X8 Decoder-IC 74ALS138
internal logic diagram and truth table
74ALS138 IC
• Problem with the simple encoder circuit is when more than one
input is activated at one time.
• A modified version of this circuit, called a priority encoder,
includes the necessary logic to ensure that when two or more
inputs are activated, the output code will correspond to the
highest-numbered input.
• For example, when both A3 and A5 are LOW, the output code will
be 101 (5). Similarly, when A6, A2, and A0
are all LOW, the output code is 110 (6).
• The 74148, 74LS148, and 74HC148
are all octal-to-binary priority encoders.
74147 Decimal-to-BCD Priority encoder
Switch encoder
2. The levels B0 to B3 pass through the OR gates into the four-bit parallel
adder to be added to the bits A0 to A3. The sum appears at the outputs
Σ0 to Σ3.
3. Note that SUB = 0 causes a carry C0 = 0 into the adder.
4. Now assume that ADD = 0 and SUB = 1. The ADD = 0 inhibits AND
gates 1, 3, 5, and 7. The SUB = 1 enables AND gates 2, 4, 6, and 8, so
that their outputs pass the B0, B1, B2, and B3 levels, respectively.
5. The levels B0 to B3 pass through the OR gates into the adder to be added
to the bits A0 to A3. Note also that C0 is now 1.
Thus, the B-register number has essentially been converted to its
2’s complement.
6. The difference appears at the outputs Σ0 to Σ3.
Serial Adder
It is used to add two binary It is used to add two binary numbers in