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
Y00
Y10
Y20
Y3Y0 = 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)
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.