A **2-to-4 line decoder** is a digital circuit that converts a 2-bit input into one of four possible outputs. It has 2 input lines and 4 output lines, where only one of the output lines is active at any time, based on the combination of the 2 input bits.
### How It Works:
- **Inputs**: The decoder has 2 input bits, typically labeled **A** and **B**. These 2 input bits can represent any one of four possible combinations: 00, 01, 10, or 11.
- **Outputs**: The decoder has 4 output lines, typically labeled **Y0, Y1, Y2, Y3**. For each combination of inputs, one of these output lines will be active (typically logic "1"), while the others will remain inactive (logic "0").
### Truth Table:
| Input A | Input B | Output Y0 | Output Y1 | Output Y2 | Output Y3 |
|---------|---------|-----------|-----------|-----------|-----------|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 |
### Key Features:
- **Selection Line**: The 2 input bits determine which output line will be activated. For example:
- When the input is **00**, **Y0** is active.
- When the input is **01**, **Y1** is active, and so on.
- **Used in Multiplexing and Address Decoding**: 2-to-4 decoders are commonly used in applications like memory address decoding, where a certain address or group of addresses needs to be selected based on the binary input. It is also used in multiplexers or demultiplexers, as it helps in routing data to the correct line.
- **Active High or Active Low**: The outputs can be designed to be active high (logic 1) or active low (logic 0), depending on the specific application requirements.
In summary, a **2-to-4 line decoder** is a simple combinational logic circuit that decodes a 2-bit input into one of four distinct output lines, providing a method for addressing or routing signals in digital systems.