Decoder: making one selection among N choices
 

A Nx2N decoder circuit has N control signals and 2N output signals:

The (one) output which is equal to 1 will be used to activate a circuit (usually a memory circuit)

Decoder: making one selection among N choices
 

Example 1:

The (one) output which is equal to 1 will be used to activate a circuit (usually a memory circuit)

Decoder: making one selection among N choices
 

Example 2:

The (one) output which is equal to 1 will be used to activate a circuit (usually a memory circuit)

How to construct a 2x4 decoder using (basic) gates

Functionality of the 2x4 decoder:

How to construct a 2x4 decoder using (basic) gates

We start with the input (control) signals and output signals:

How to construct a 2x4 decoder using (basic) gates

Make all combinations of the control signals:

How to construct a 2x4 decoder using (basic) gates

This AND gate will make o0=1 if and only if c1=0, c0=0:

How to construct a 2x4 decoder using (basic) gates

This AND gate will make o1=1 if and only if c1=0, c0=1:

How to construct a 2x4 decoder using (basic) gates

This AND gate will make o2=1 if and only if c1=1, c0=0:

How to construct a 2x4 decoder using (basic) gates

This AND gate will make o3=1 if and only if c1=1, c0=1:

How to construct a 2x4 decoder using (basic) gates
 

Sample operation:

DEMO: /home/cs355001/demo/circuits/decoder

Decoder is usually followed by a row of AND "filters"
 

Notice that the decoder will always have ONE output equal to 1:

We sometimes, we need to option of no activation (i.e.: all outputs = 0)

Decoder is usually followed by a row of AND "filters"

Decoder with the option of no activation:

When Activate = 0, all outputs = 0
When Activate = 1, exactly 1 output = 1 (others = 0)