Building a Decoder for a Specific Function: Exploring Simple Solutions

  • Thread starter tt1234
  • Start date
  • Tags
    Decoder
In summary, Tom is seeking help in finding a decoder for a specific boolean function with 16 input and output states. He has tried using a 4-16 decoder and multiple logic gates, but is looking for a simpler solution. The function works more like a decoder than a counter, with the state of the outputs determined by the state of the inputs.
  • #1
tt1234
5
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
  • #2
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.
 
  • #3
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
 
  • #4
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?
 
  • #5
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!
 
  • #6
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.
 
  • #7
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
 
  • #8
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.
 
  • #9
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
 

What is a decoder and how does it work?

A decoder is a digital circuit that converts coded information into a set of signals. It works by analyzing the input code and determining which output signal corresponds to the given input.

What is the difference between a decoder and a demultiplexer?

While both a decoder and a demultiplexer perform similar functions of converting coded information, a decoder typically has multiple inputs and a single output, while a demultiplexer has a single input and multiple outputs.

What is the purpose of a decoder in a computer system?

A decoder is used in computer systems to decode instructions and data stored in binary code into signals that can be understood by the computer's central processing unit (CPU).

What are the common applications of decoders?

Decoders are commonly used in digital electronics, such as in computers, calculators, and communication systems. They are also used in remote controls, keyless entry systems, and security systems.

What are the different types of decoders?

There are several types of decoders, including binary decoders, decimal decoders, priority encoders, and programmable decoders. Each type has its own specific function and is used in different applications.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
20
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
16K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
987
  • Engineering and Comp Sci Homework Help
Replies
1
Views
248
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
896
  • Engineering and Comp Sci Homework Help
Replies
21
Views
2K
  • General Math
Replies
4
Views
762
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
Back
Top