2-to-4 bit decoder and 4-to-16 bit decoder help...

Discussion in 'Homework Help' started by imzack, Nov 3, 2010.

  1. imzack

    Thread Starter Active Member

    Nov 3, 2010
    I have to design a 2-to-4 bit decoder and then use those decoders, to make a 4-to-16 bit decoder by cascading it....(in VHDL btw.)

    I am having trouble understanding 1st what a decoder really does and is used for... (I read that is just encodes stuff but can someone explain and break it down into dumbed down terms please.)

    and 2ndly
    I see there are various enables in this decoder... what are they used for? i understand them in a multipelxer, but am having trouble here...

    if someone could assist me it would be greatly appricated!
    thank you

  2. haykp

    New Member

    Oct 7, 2010
    decoder and encoder are very similar things, one just decods the signal the other one just encodes the signal.
    So if you have some coder, and if that coder input bits are more then ouput bits and this circuit is called decoder if vice avers then encoder.
  3. Georacer


    Nov 25, 2009
    A decoder is a device that receives n bits as input and gives 2^n bits as ouptut. Its function is to enable only one output line at a time. Which line will be activated is specified by the input number.

    For example, if the input of a 3-to-8 decoder is 011, line 3 (otherwise said as the 4th line) will be activated.

    See these links for more reading:

    A very common use of a decoder is in the implementation of a bus. In that case we want to select only one device to write or read data from the bus, and everyone else to stay inactive. To do this, we connect the "enable" pins of the devices with the ouputs of a decoder. When we input a number in the decoder, only the corresponding device will be activated.