Skip to content
DLVSDigital Logic Visualizing System

Logic Lab

Combinational

Half and full adder and subtractor, magnitude comparator, decoder, encoder, multiplexer and de-multiplexer, each drawn from basic or universal gates.

Decoder, 2-to-4

Size
A
B
E
1
Y0
0
Y1
0
Y2
0
Y3
Y0 = E·A′·B′
Y1 = E·A′·B
Y2 = E·A·B′
Y3 = E·A·B

A decoder turns an 2-bit code into a single active line out of 4. With the enable E at 0 every output stays 0, which is how several decoders are joined to make a bigger one.

Built from logic gates (4 gates)

0A0B1EY0=1Y1=0Y2=0Y3=0

Tap an input box in the diagram (or use the switches above) and watch the signal travel: amber wires carry 1, grey wires carry 0, and a gate fills amber when its output is 1. A small circle on a gate input is an inverter on that input.