A 2-to-4 decoder is a combinational digital circuit used to decode a 2-bit binary input into one of four mutually exclusive output lines. Essentially, it takes a 2-bit binary number as input and activates exactly one of the four outputs, based on the binary value of the input. Here's a detailed explanation:
---
### **1. Basic Functionality**
- The circuit has:
- **2 inputs:** \( A \) (Most Significant Bit, MSB) and \( B \) (Least Significant Bit, LSB).
- **4 outputs:** \( Y_0, Y_1, Y_2, Y_3 \).
- **Inputs:** A combination of 2 binary digits gives \( 2^2 = 4 \) possible combinations: \( 00, 01, 10, \) and \( 11 \).
- **Outputs:** Only one output line is HIGH (1) at a time, corresponding to the binary value of the input. The other outputs are LOW (0).
---
### **2. Truth Table**
| Input \( A \) | Input \( B \) | Output \( Y_0 \) | Output \( Y_1 \) | Output \( Y_2 \) | Output \( Y_3 \) |
|---------------|---------------|------------------|------------------|------------------|------------------|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 |
**Explanation:**
- For input \( A = 0 \), \( B = 0 \), \( Y_0 = 1 \), and all other outputs are 0.
- Similarly, each binary input uniquely activates its corresponding output line.
---
### **3. Circuit Logic**
The logic expressions for the outputs are derived based on the truth table. Outputs are generated using **AND gates** in combination with NOT gates.
- \( Y_0 = \overline{A} \cdot \overline{B} \)
- \( Y_1 = \overline{A} \cdot B \)
- \( Y_2 = A \cdot \overline{B} \)
- \( Y_3 = A \cdot B \)
Each \( Y \) line corresponds to an AND gate, with its inputs being the correct combination of \( A \), \( B \), and their complements.
---
### **4. Implementation**
- The circuit uses **2 inputs**, **4 AND gates**, and **2 NOT gates**:
- NOT gates invert \( A \) and \( B \).
- Each AND gate takes a specific combination of \( A, B, \overline{A}, \overline{B} \) to produce one output.
---
### **5. Working Example**
- Suppose inputs \( A = 1 \), \( B = 0 \):
- \( \overline{A} = 0 \), \( \overline{B} = 1 \).
- \( Y_0 = \overline{A} \cdot \overline{B} = 0 \cdot 1 = 0 \).
- \( Y_1 = \overline{A} \cdot B = 0 \cdot 0 = 0 \).
- \( Y_2 = A \cdot \overline{B} = 1 \cdot 1 = 1 \).
- \( Y_3 = A \cdot B = 1 \cdot 0 = 0 \).
- Therefore, \( Y_2 \) is HIGH (1), and other outputs are LOW (0).
---
### **6. Applications**
- Address decoding in memory units.
- Selection in multiplexers/demultiplexers.
- Control systems where specific binary inputs must activate specific components.
The 2-to-4 decoder is a fundamental building block in digital systems!