LogicLab

2:4 decoder with enable

A 2-to-4 decoder converts a 2-bit binary input into a one-hot output: exactly one of four lines is 1.

Circuit diagram of the 2:4 decoder with enable

Open this circuit in LogicLab →

Boolean expressions

Truth table

A1A0ENY0Y1Y2Y3
0000000
0011000
0100000
0110100
1000000
1010010
1100000
1110001

How it works

Each output is an AND gate that recognises one input combination, using inverters for the bits that must be 0. The enable input is ANDed into every output so the whole decoder can be switched off.

Try it yourself

Turns a 2-bit number into one of four active outputs; with EN low every output stays 0. Open the circuit, click the switches to change the inputs, and watch the LEDs and the waveform panel respond. You can edit the circuit, convert it to NAND-only or NOR-only gates, and save or export your version.

Related circuits

Reference: en.wikipedia.org/wiki/Binary_decoder