Digital Design - decoders and multiplexer help

In summary, the conversation discusses the implementation of a function, f(x3; x2; x1; x0), which outputs y1 = 1 if the number of 1's in x3x2x1x0 is even, 0 otherwise, and y0 = 1 if the number of 1's is odd, 0 otherwise. The function can be implemented with either four 2-to-4 decoders or a 4-to-1 multiplexer with selection inputs x0 and x1. A truth table is created to better understand the function, and it is determined that if x3..x0 | y1,y0 = 0,0,0,0 | 0,0
  • #1
Saterial
54
0

Homework Statement


Let f(x3; x2; x1; x0) = (y1; y0) such that y1 = 1 if the number of 1's in x3x2x1x0 is even, 0 otherwise, and, output y0 = 1 if the number of 1's in x3x2x1x0 is odd, 0 otherwise.

1. Implement f with four 2-to-4 decoders.
2. Implement f with a 4-to-1 multiplexer with selection inputs x0; x1 (in this order)

Homework Equations


The Attempt at a Solution



How do I even start solving this? This was a bonus as it was not really taught to me so I have to learn myself.

(IN THE CASE OF 0, 0, 0, 0, both y1 and y0 are 0 right? because there are no 1's at all)

I begin by making a truth table of:
Code:
x3 x2 x1 x0   y1 y0
 0  0  0  0    0  0
 0  0  0  1    0  1
 0  0  1  0    0  1
 0  0  1  1    1  0
 0  1  0  0    0  1
 0  1  0  1    1  0
 0  1  1  0    1  0
 0  1  1  1    0  1
 1  0  0  0    0  1
 1  0  0  1    1  0
 1  0  1  0    1  0
 1  0  1  1    0  1
 1  1  0  0    1  0
 1  1  0  1    0  1
 1  1  1  0    0  1
 1  1  1  1    1  0

Where do I go from here?
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Saterial said:
(IN THE CASE OF 0, 0, 0, 0, both y1 and y0 are 0 right? because there are no 1's at all)

Zero is an even number.

If x3..x0 | y1,y0 = 0,0,0,0 | 0,0 then y1 would indicate: "number of ones is not even" y0 would indicate "number of ones is not odd" --a contradiction.
 
  • #3
So that would mean the output of y1 and y0 in my case is 1, 0 for 0, 0 ,0 0 in my case because the number of 1's is even and not odd?
 
  • #4
Yes. And it should make your job somewhat easier as well.
 
  • #5


I would approach this problem by first understanding the basic concepts of decoders and multiplexers. Decoders are digital circuits that convert coded inputs into a set of outputs, while multiplexers are circuits that select one of several inputs and allow it to pass through to the output.

In this problem, we are given a function f that takes in four inputs (x3, x2, x1, x0) and produces two outputs (y1, y0). From the truth table, we can see that the output y1 is 1 when the number of 1's in the input is even, and 0 otherwise. Similarly, y0 is 1 when the number of 1's in the input is odd, and 0 otherwise.

To implement this function using four 2-to-4 decoders, we can use the inputs x3, x2, x1, x0 as the select inputs for the decoders. Each decoder will have four outputs (A, B, C, D) which correspond to the binary representation of the input. For example, if the input is 0011, the decoder with select inputs x3 and x2 will produce outputs A=0, B=0, C=1, D=1. We can then use these outputs to construct the outputs y1 and y0 according to the given function.

To implement this function using a 4-to-1 multiplexer, we can use the inputs x0 and x1 as the select inputs for the multiplexer. The four inputs of the multiplexer will be x3, x2, x1, x0. The output of the multiplexer will be y1 and y0, which can be constructed using the same logic as before.

Overall, both methods will result in the same outputs y1 and y0 for a given set of inputs. It is up to the designer to choose which method is more efficient or suitable for their specific application.

I would also recommend researching and practicing with some basic examples of decoder and multiplexer circuits to gain a better understanding of their functionality and applications.
 

1. What is a decoder in digital design?

A decoder is a digital circuit that takes an input code and produces an output based on that code. It essentially decodes the input code into a specific output signal based on the rules of the decoder's design. Decoders are commonly used in digital electronics to control multiple output signals based on a single input.

2. How does a decoder work?

A decoder works by using a combination of logic gates, such as AND and NOT gates, to generate the desired output signals based on the input code. The input code is compared to a predefined set of rules or a truth table, which determines the output signals. Depending on the complexity of the decoder, the output can be a single signal or multiple signals.

3. What is the purpose of a multiplexer in digital design?

A multiplexer, also known as a "MUX", is a digital circuit that selects and transmits one of several input signals to a single output. It essentially combines multiple inputs into a single output, based on a select signal. Multiplexers are commonly used in digital electronics to reduce the number of input/output lines required for a circuit, thus saving space and cost.

4. How does a multiplexer work?

A multiplexer works by using a selection signal, also known as a "select line", to determine which input signal is transmitted to the output. The select signal is compared to a predefined set of rules or a truth table, which determines which input is selected. Depending on the complexity of the multiplexer, the output can be a single signal or multiple signals.

5. What are some common applications of decoders and multiplexers in digital design?

Decoders and multiplexers have a wide range of applications in digital design. Some common examples include controlling LED displays, selecting memory addresses, and data routing in communication systems. They are also commonly used in digital circuit design for microprocessors, computers, and other electronic devices.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
886
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
996
  • Engineering and Comp Sci Homework Help
Replies
8
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
Back
Top