0
0
VHDLprogramming~5 mins

Decoder and encoder design in VHDL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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)?
AAll outputs are low
BOutput line 1 is high, others low
COutput line 3 is high, others low
DOutput line 2 is high, others low
Which VHDL construct is best for implementing an encoder?
AFor loop
BProcess with if-elsif statements
CWait statement
DGenerate statement
What is the output of a priority encoder if inputs 3 and 5 are both active?
ABinary code of input 5
BBinary code of input 3
CAll outputs high
DNo output
How many outputs does a 4-to-16 decoder have?
A4
B8
C16
D32
Which statement best describes an encoder?
AConverts one-hot input to binary output
BConverts binary input to one-hot output
CAmplifies input signals
DStores data temporarily
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.