Page 87 - DCAP108_DIGITAL_CIRCUITS_AND_LOGIC_DESIGNS
P. 87
Digital Circuits and Logic Design
Notes Self Assessment
Choose the correct answer:
1. The gates required to build a half adder are:
(a) EX-OR gate and NOR gate (b) EX-OR gate and OR gate
(c) EX-OR gate and AND gate (d) Four NAND gates.
2. A full adder logic circuit will have:
(a) Two inputs and one output. (b) Three inputs and three outputs.
(c) Two inputs and two outputs. (d) Three inputs and two outputs.
3. In modern computer adders reside in the arithmetic logic unit (ALU).
(a) True (b) False
4. Full-adder circuit adds only two binary numbers.
(a) True (b) False
5. Binary encoder encodes information from ............ inputs into an n-bit code exactly one of
the input signals.
(a) n 2 (b) 1
(c) n (d) 2n
5.3 Encoder
An encoder performs the opposite function of a decoder. It encodes given information into a
more compact form.
5.3.1 Binary Encoder
A binary encoder encodes information from 2n inputs into an n-bit code, as indicated in
Figure 5,5. Exactly one of the input signals should have a value of 1, and the outputs present the
binary number that identifies which input is equal to 1. The truth table for a 4-to-2 encoder is
provided in Figure 5.6. Observe that the output y0 is 1 when either input w1 or w3 is 1, and output
y1 is 1 when input w2 or w3 is 1. Hence these outputs can be generated by the circuit in Figure 5.6.
Note that we assume that the inputs are one-hot encoded. All input patterns that have multiple
inputs set to 1 are not shown in the truth table, and they are treated as do-not-care conditions.
Encoders are used to reduce the number of bits needed to represent given information. A practical
use of encoders is for transmitting information in a digital system. Encoding the information
allows the transmission link to be built using fewer wires. Encoding is also useful if information
is to be stored for later use because fewer bits need to be stored.
Figure 5.5: A 2n-to-n Binary Encoder
82 LOVELY PROFESSIONAL UNIVERSITY