Below code can implement NOT gate in VHDL. The code is written in data flow model.
Library ieee;
use ieee.std_logic_1164.all;
Entity gates is
port (a : in std_logic; c : out std_logic);
end gates ;
architecture and1 of gates is
begin
c<=not a;
end and1;
Below code can implement NOR gate in VHDL. The code is written in data flow model.
Library ieee;
use ieee.std_logic_1164.all;
Entity gates is
port (a,b : in std_logic; c : out std_logic);
end gates ;
architecture and1 of gates is
begin
c<=a nor b;
end and1;
Below code can implement XNOR gate in VHDL.
The code is written in data flow model.
Library ieee;
use ieee.std_logic_1164.all;
Entity gates is
port (a,b : in std_logic; c : out std_logic);
end gates ;
architecture and1 of gates is
begin
c<=a xnor b;
end and1;
Below code can implement NOT gate in VHDL.
The code is written in behavioral model.
Library ieee;
use ieee.std_logic_1164.all;
Entity gates is
port (a: in std_logic; c : out std_logic);
end gates ;
architecture and1 of gates is
begin
process(a)
Begin
If a=1 then
C<='0';
Else
C<= '1';
End if;
End process;
End and1;
Below code can implement NAND gate in VHDL. The code is written in data flow model. Library ieee; use ieee.std_logic_1164.all; Entity gates is port (a,b : in std_logic; c : out std_logic); end gates ; architecture and1 of gates is begin c<=a nand b; end and1;
A 2 input NAND gate requires 4 NOR gates.A 3 input NAND gate requires 5 NOR gates.A 4 input NAND gate requires 6 NOR gates.etc.
A logic gate is used to implement any digital logic. It may be AND, OR, XOR, NOT, XNOR, NAND, NOR. These logic gates can be used to implement the output equations of digital circuits in order to design them.
NOR gate = not(A or B) = A nor BAND gate = A and BAND gate = not(not A or not B)AND gate = not(not(A or A) or not(B or B))AND gate = (A nor A) nor (B nor B)Therefore using 2 input NORs to make a 2 input AND you need three NORs. If you wanted something different (e.g. a 5 input AND) the above proof can be modified appropriately to get your answer.
1. Explain NOR gate as Universal Gate A NOR gate is a simple OR gate with an inverter (NOT gate) at the output. NOR gates are considered Universal Gates because thay can be configured in a few different ways. Connecting the inputs on a NOR gate will result in a NOT gate (inverter). Connecting the above to the output of a NOR gate results in an OR gate.
A logic circuit of any complexity can be realized by using only the three basic gates (NOT, AND, and OR Gates). There are two universal gates, the NAND Gate and the NOR gate. Each of those can also realize logic circuit single-handedly. The NAND and NOR gates are therefore called universal gates.
A universal gate is a gate which can implement any Boolean function without need touse any other gate type.The NAND and NOR gates are universal gates.In practice, this is advantageous since NAND and NOR gates are economical andeasier to fabricate and are the basic gates used in all IC digital logic families.In fact, an AND gate is typically implemented as a NAND gate followed by aninverter not the other way around!!Likewise, an OR gate is typically implemented as a NOR gate followed by an inverternot the other way around!!A universal gate is a gate which can implement any Boolean function without need touse any other gate type.The NAND and NOR gates are universal gates.In practice, this is advantageous since NAND and NOR gates are economical andeasier to fabricate and are the basic gates used in all IC digital logic families.In fact, an AND gate is typically implemented as a NAND gate followed by aninverter not the other way around!!Likewise, an OR gate is typically implemented as a NOR gate followed by an inverternot the other way around!!can be combined to produce AND, OR,NOT,XORand XNOR gates
This is made by joining the inputs of a NOR gate. As a NOR gate is equivalent to an OR gate leading to NOT gate, this automatically sees to the "OR" part of the NOR gate, eliminating it from consideration and leaving only the NOT part. Truth Table Input A Output Q 0 1 1 0
b'coz t mobility of electrons in NAND gate is 3 times higher than that of NOR gate
an 2 input AND gate can be realize using 3 NOR gates.Let ,A and B are the input and x be the output.x=A.B= NOR(NOR(A) NOR(B))
NOR gate is equivalent to bubbled AND gate. -Nidhi Singh
NOR gate is equivalent to bubbled AND gate. -Nidhi Singh