Is There a Simple Way to Build a Decoder for Specific Functions?

  • Thread starter Thread starter tt1234
  • Start date Start date
  • Tags Tags
    Decoder
AI Thread Summary
The discussion centers on building a decoder for a specific function with 16 input/output states. The original poster, Tom, seeks a simpler solution than using numerous logic gates to achieve the desired outputs based on the given inputs. Participants suggest that while decoders typically follow a repetitive pattern, there may be redundancies in Tom's function that could be simplified. They encourage exploring the truth table and using techniques like Karnaugh maps to reduce complexity. Ultimately, the consensus is that a more efficient solution exists than the initially proposed method involving 32 gates.
tt1234
Messages
5
Reaction score
0
Hi,

I wonder is there a decoder avalible for the following function? If not what is the simplest way to build one?



Input: 0 0 0 0 Output: 0 0 0.....0
Input: 0 0 0 1 Output: 1 0 0.....0
Input: 0 0 1 0 Output: 1 1 0.....0
Input: 0 0 1 1 Output: 1 1 1.....0


Input: 1 1 1 1 Output: 1 1 1.....1


Thanks for help!

Regards,

Tom
 
Physics news on Phys.org
Decoders logic ICs aren't generally designed for a specific boolean function, they more so have a pattern that is repetitive depending on your enable bits. Its your job to setup the inputs and outputs, any other logic gates, and the way you wire it up to your system to make the decoder perform your specific function.

If the "..." are don't cares, then you have 4 inputs and 4 outputs, which there are many decoders available for this.
 
Hi,

Thanks for your reply. In fact the dot counts. I should give more detail:

Input: 0 0 0 0 Output: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 0 1 Output: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 0 Output: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 1 Output: 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 1 0 0 Output: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
.
.
.

Input: 1 1 1 1 Output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

It needs a lot of logic gates to decode each of the output pin. I wonder if there is a simple way for it?

Thanks!

Tom
 
tt1234 said:
Hi,

Thanks for your reply. In fact the dot counts. I should give more detail:

Input: 0 0 0 0 Output: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 0 1 Output: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 0 Output: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 1 Output: 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 1 0 0 Output: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
.
.
.

Input: 1 1 1 1 Output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

It needs a lot of logic gates to decode each of the output pin. I wonder if there is a simple way for it?

Thanks!

Tom

I think I see a way to do it that's pretty simple. But since this is homework, I'm not allowed to just tell you the answer, or even give you the hint that I'd like to give (too simple to solve with the full hint). So here's a partial hint... What does a 4:16 decoder give you for its truth table? How is the output of the 4:16 decoder different from what you are asked to make above?
 
Hi,

I doubt there is a simple solution that can be done with a 4-16 decoder and couple of logical gates. I can get each pin with two four input logic gates and it will need total 32 gates or with a PLD. I can't figure out a simpler way but I think there could be one.

By the way, it is not a homework. I am trying to build a small circuit to drive a LED array output.

Thanks!
 
tt1234 said:
Hi,

I doubt there is a simple solution that can be done with a 4-16 decoder and couple of logical gates. I can get each pin with two four input logic gates and it will need total 32 gates or with a PLD. I can't figure out a simpler way but I think there could be one.

By the way, it is not a homework. I am trying to build a small circuit to drive a LED array output.

Thanks!
you definitely do not need 32 gates ;) If this is not a homework, then for starters I will tell you that you have a lot of redudant bits that can disappear with just 1 gate (those bits are either ALL 0 for 4 of your 5 input states, and all 1s in the 5th state which can be toggled/identified by the 3rd LSB of your input). Try simplifying your function by just looking at your truth table or breaking it up into smaller functions or you could use a truth table and karnaugh maps if you're crazy :D Again, you can probably pull this off with a decoder.
 
Hi,

I may not express the question clearly. It has more than five input/out states. It has 16 input/output states.

Input: 0 0 0 0 Output: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 0 1 Output: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 0 Output: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 1 Output: 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 1 0 0 Output: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 1 0 1 Output: 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0.
Input: 0 1 1 0 Output: 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0.
Input: 0 1 1 1 Output: 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0.

-------Other states omitted here -----------

Input: 1 1 1 0 Output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Input: 1 1 1 1 Output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1I tried but I can't find a simple way to do it.

Tom
 
tt1234 said:
Hi,

I may not express the question clearly. It has more than five input/out states. It has 16 input/output states.

Input: 0 0 0 0 Output: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 0 1 Output: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 0 Output: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 0 1 1 Output: 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 1 0 0 Output: 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Input: 0 1 0 1 Output: 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0.
Input: 0 1 1 0 Output: 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0.
Input: 0 1 1 1 Output: 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0.

-------Other states omitted here -----------

Input: 1 1 1 0 Output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Input: 1 1 1 1 Output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


I tried but I can't find a simple way to do it.

Tom

keep trying, you will get it. There is a simpler way than using 32 logic gates.
 
I understand the inputs are counting in Sequence?
 
  • #10
Hi,

It works more like a decoder than a counter. The state of the 16 output are determined by the state of the four input. It doesn't count any previous states.

Tom
 

Similar threads

Back
Top