Recall & Review
beginner
What is the main function of a decoder in digital circuits?
A decoder takes a binary input and activates exactly one output line corresponding to that input, converting coded inputs into a one-hot output.
Click to reveal answer
beginner
What does an encoder do in digital logic?
An encoder takes multiple input lines and converts the active input into a binary code on the output lines, essentially the reverse of a decoder.
Click to reveal answer
intermediate
In VHDL, which statement is commonly used to implement a decoder?
The 'with-select' or 'case' statement is commonly used to implement a decoder by selecting output lines based on input values.
Click to reveal answer
intermediate
How do you represent a 3-to-8 decoder in VHDL?
A 3-to-8 decoder has 3 input bits and 8 output lines. The output line corresponding to the binary value of the input is set to '1', others to '0'. This can be coded using a 'with-select' or 'case' statement.
Click to reveal answer
advanced
What is a priority encoder and how does it differ from a simple encoder?
A priority encoder outputs the binary code of the highest priority active input when multiple inputs are active, unlike a simple encoder which assumes only one input is active.
Click to reveal answer
What output does a 2-to-4 decoder produce when input is "10" (binary)?
✗ Incorrect
For input '10' (binary 2), the decoder activates output line 2 only.
Which VHDL construct is best for implementing an encoder?
✗ Incorrect
A process block with if-elsif statements is commonly used to check inputs and assign the encoded output.
What is the output of a priority encoder if inputs 3 and 5 are both active?
✗ Incorrect
The priority encoder outputs the code of the highest priority active input, here input 5.
How many outputs does a 4-to-16 decoder have?
✗ Incorrect
A 4-to-16 decoder has 16 output lines, one for each possible 4-bit input combination.
Which statement best describes an encoder?
✗ Incorrect
An encoder converts one-hot input signals into a binary code output.
Explain how a 3-to-8 decoder works and how you would implement it in VHDL.
Think about how each input combination activates a unique output.
You got /4 concepts.
Describe the difference between a simple encoder and a priority encoder.
Consider what happens when more than one input is active.
You got /3 concepts.