A 2-bit Analog-to-Digital Converter (ADC) with a priority encoder is a simple circuit that converts an analog voltage signal into a 2-bit digital output. This type of ADC uses comparators to compare the input voltage against reference voltage levels and a priority encoder to produce the corresponding binary output. Here’s a breakdown of how it works:

Components of a 2-Bit ADC with Priority Encoder

  1. Input Voltage (VIN): The analog signal that you want to convert to a digital format.
  2. Comparators: Two comparators are used to compare the input voltage against two reference voltage levels. Each comparator outputs a HIGH or LOW signal based on the comparison.
  3. Reference Voltages (VREF1 and VREF2): These are the voltage levels against which the input voltage is compared. For a 2-bit ADC, you typically set the reference voltages to divide the input range into four levels:
  4. Priority Encoder: This component takes the outputs from the comparators and encodes them into a binary format. The priority encoder ensures that if multiple comparators output HIGH, the one with the highest priority is selected.

Operation of the 2-Bit ADC

  1. Voltage Levels: The input voltage (VIN) is compared against the reference voltages:
  2. Priority Encoding: The priority encoder takes the outputs from the comparators:

Example Circuit

Here’s a simple representation of how the circuit might be set up:

          +-------+          +-------+
VIN ----->| Comp 1 |----->---|       |
          | (VREF1)|        |       |
          +-------+          |       |
                             | Encoder|-----> Output (Q1, Q0)
          +-------+          |       |
VIN ----->| Comp 2 |----->---|       |
          | (VREF2)|        +-------+
          +-------+

Truth Table

VIN (V) Comp 1 Output Comp 2 Output Encoder Output (Q1 Q0)
0 - 1 LOW LOW 00
1 - 2 HIGH LOW 01
2 - 3 HIGH HIGH 10
3+ HIGH HIGH 11

🧠Simulation

https://gist.github.com/viadean/b562594fea7b78782c3a2809c737b6fb

image.png