Combinatorial Logic Flashcards
What are the main two uses for a multiplexer?
- Data steering
- Function generating
What is the order of gate implementation for SOP?
AND gate followed by OR gate
What is the order of implementation for POS?
OR gate followed by AND gate
If we are given a K-Map for a multiplexer, how can we determine the gates used?
We can group each column and by evaluating the SOP (1’s) we can observe what kind of gate is associated with this behaviour.
What is a 4 to 1 mux?
It consists of 4 data input lines, two select lines, and one output
What does an 8 to 1 mux consist of?
8 input data lines, 3 select lines, 1 output
Describe how to implement a 4 to 1 mux in VHDL
State the entity and define the ports:
- Input ports e.g. D0, D1, D2, D3
- Select: in logic vetor 2 bit wide
- y : out.
Next the architecture of mux_arch of mux is
y will be assigned from D0 to D3 when the select line increases from “00” to “11”
Describe an encoder.
An encoder has a numver of input lines, only one of which is activated at a given time.
It produces an N-bit output code depending on which input is activated.
What relation must be satisfied for an encoder?
For M (input) elements to be uniquely encoded, the output code of width N must satisfy the relation:
What is a priority encoder?
A priority encoder has the same function as an encoder, however input elements are given an order of priority.
This means that if two inputs are selected simultaneously then, the input with the higher priority is encoded.
What is special about the encoder inputs?
The inputs to an encoder follow a pattern in which only one bit in the sequence is high whilst the rest remain low. The value of the bit that is one increases as we move down the inputs.
Describe how we can implement an 8 to 3 encoder in VHDL.
We define the ports in the entity, which will be the input and output. These values will be logic vectors - input (7downto0) and output (2downto0).
A case statement is used to assign the input (8 bit) case to an output (3 bit) using a series of when statements.
What is a comparator used for?
A comparator circuit is used to compare the magnitudes of two numbers expressed in binary.
What are the two circuits which implement a 1-bit comparator?
An Equality circuit which imlements a XNOR gate
An Inequality circuit which implements a XOR gate