DIGITAL DESIGN USING LOGIC.LY

TASK – DECODER

 

 

TASK DESCRIPTION

 

A decoder is a device that has n inputs and 2n outputs.  Each combination of inputs leads to exactly one output being set to 1 and all others being set to 0.

 

Above, you see a block diagram of a 2 x 4 decoder which is simply a decoder with 2 inputs and 4 outputs.. 

 

You will learn how and encoder works and create one in this task.

 

THEORY

 

As mentioned above, a decoder has n inputs and 2n outputs.  Each output will be 1 only for a specific input combination.  The idea is that the decoder decodes the binary value of the inputs and sets that one corresponding output to 1 and all other outputs to 0.

 

A 1-input decoder, also known as a 1 x 2 decoder, has the following truth table:

 

A   D0  D1

0   1   0

1   0   1

 

A 2-input decoder, also known as a 2 x 4 decoder, has the following truth table:

 

A   B   D0  D1  D2  D3

0   0    1   0   0   0

0   1    0   1   0   0 

1   0    0   0   1   0

1   1    0   0   0   1

 

Notice that the binary value of the inputs A and B corresponds to the number of the D output that is set to 1.  For example, when AB are 11, which is 3 in decimal, it is D3 that is set to 1.

 

The circuit for a 2x4 decoder looks like this:

 

 

TASK

 

Create a 2x4 decoder to earn a max of 90%.
Create a 3x8 decoder to earn a max of 100%.

 

You must connect the outputs to lightbulbs to see which line is on.

You must label your inputs and outputs with A, B, D0, D1, …

Your outputs need to be placed in order.

TO SUBMIT

 

A screen capture of you decoder.

GOT EXTRA TIME?

 

Try researching different uses for a binary decoder.

Try researching what an encoder is.