Encoder / Decoder Calculator
Simulate 8×3 encoder and 3×8 decoder circuits with interactive truth tables. Essential for understanding data encoding and address decoding in digital systems.
Circuit Type
Inputs
What are Encoders and Decoders?
Encoders and decoders are complementary digital circuits. Encoders convert multiple input lines into fewer output lines with binary codes, while decoders perform the reverse operation, converting binary codes back into individual output lines.
How to Use This Calculator
- Select circuit type - Choose 8×3 Encoder or 3×8 Decoder
- Set input values - Configure input lines or address bits
- Click "Calculate" to see encoded/decoded outputs
- View results including truth table and Boolean expressions
- Copy or export the analysis for your projects
8×3 Priority Encoder
What is a Priority Encoder?
An 8×3 priority encoder has 8 input lines (I0-I7) and produces a 3-bit binary output representing the highest priority active input. Higher numbered inputs have higher priority.
Boolean Expressions
- Y0 = I1 + I3 + I5 + I7 (LSB)
- Y1 = I2 + I3 + I6 + I7
- Y2 = I4 + I5 + I6 + I7 (MSB)
3×8 Binary Decoder
What is a Binary Decoder?
A 3×8 decoder has 3 address inputs (A0-A2) and 8 output lines (Y0-Y7). Only one output is active (high) at a time, corresponding to the binary address.
Operation
- Address 000: Y0 = 1, all others = 0
- Address 001: Y1 = 1, all others = 0
- Address 010: Y2 = 1, all others = 0
- And so on...
Applications and Uses
Encoders
- Keyboard encoding
- Priority interrupt systems
- Data compression
- Position encoding
Decoders
- Memory address decoding
- Instruction decoding in CPUs
- Display drivers
- Device selection
Examples & Worked Problems
Example 1: Priority Encoder
Problem: Inputs I2=1, I5=1, I7=0. What is the output?
Solution:
- I5 has higher priority than I2
- Binary representation of 5 is 101
- Output: Y2=1, Y1=0, Y0=1
Example 2: Binary Decoder
Problem: Address A2=1, A1=0, A0=1. Which output is active?
Solution:
- Binary address: 101 = decimal 5
- Output Y5 = 1, all others = 0