In: Computer Science
What type of the combinational circuit is described by the
following VHDL process? 1. XOR gate 2. XNOR gate 3. 2-to-1 MUX 4. half adder |
VHDL Code
process (A,B)
begin
if (A = '0' and B = '1') OR (A='1' AND B='0')
then
Y <= '1';
else
Y <= '0';
end if;
end process;
From above code we conclude this truth table:
A | B | Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
1. XOR gate
here is the truth table :
In above VHDL code , when the input A=1 , B=0 the output Y is high i.e 1 and also when the input A=0 , B=1 the output Y is high(1) , similarly in the xor gate truth table same thing happen
2. Xnor Gate
Here the truth table:
The above table doesnot match with VHDL code truth table
3. 2-to-1 MUX
Multiplexer does not behave as as given in VHDL Code , it is used to select input
4. Half adder
Half adder contains two output one is carry and one is sum but in VHDL code only one output is there.
so here is answer of your question:
The above VHDL code descibes XOR Gate circuit .