Digital Circuits
Encoders and Decoders
21 questions By Tony R. Kuphaldt
-
Question 10 of 21
What is a priority encoder circuit, and how does it differ from a regular encoder? Find a datasheet for a priority encoder, and explain how the encoder circuit works.
Reveal answerA priority encoder encodes only the highest-order active input, even if multiple inputs are activated.
Notes:Be sure to ask your students where and how they found their respective priority encoder datasheets.
-
Question 11 of 21
The circuit shown here is a four-bit analog-to-digital converter (ADC). Specifically, it is a flash converter, so named because of its high speed:

Explain why we must use a priority encoder to encode the comparator outputs into a four-bit binary code, and not a regular encoder. What problem(s) would we have if we were to use a non-priority encoder in this ADC circuit?
Reveal answerI won’t directly answer this question, but instead pose a “thought experiment.” Suppose the analog input voltage (Vin) were slowly increased from 0 volts to the reference voltage (Vref). What do the outputs of the comparators do, one at a time, as the analog input voltage increases? What input conditions does the encoder see? How would a primitive “diode network” type of encoder (which we know does not encode based on priority) interpret the comparator outputs?
Notes:Here, I show students a very practical application of a priority encoder, in which the necessity of priority encoding should be apparent after some analysis of the circuit.
-
Question 12 of 21
Predict how the operation of this “flash” analog-to-digital converter (ADC) circuit will be affected as a result of the following faults. Consider each fault independently (i.e. one at a time, no multiple faults):

- Resistor R16 fails open:
- Resistor R1 fails open:
- Comparator U13 output fails low:
- Solder bridge (short) across resistor R14:
For each of these conditions, explain why the resulting effects will occur.
Reveal answer- Resistor R16 fails open: Output code will be 15 (1111) all the time.
- Resistor R1 fails open: If Vin < Vref, output will be 0 (0000); if Vin > Vref, output will be 15 (1111).
- Comparator U13 output fails low: Output will assume the “13” state (1101) unless Vin exceeds that analog value, then the ADC will register properly.
- Solder bridge (short) across resistor R14: There will be no distinctive “13” state (1101), the analog values for all the other states adjusting slightly to fill the gap.
Notes:The purpose of this question is to approach the domain of circuit troubleshooting from a perspective of knowing what the fault is, rather than only knowing what the symptoms are. Although this is not necessarily a realistic perspective, it helps students build the foundational knowledge necessary to diagnose a faulted circuit from empirical data. Questions such as this should be followed (eventually) by other questions asking students to identify likely faults based on measurements.

