Download - AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’
![Page 1: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/1.jpg)
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
![Page 2: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/2.jpg)
VHDL Code for AND Gate
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity andgate is
Port( A : in std_logic;
B : in std_logic;
Y : out std_logic);
end andgate;
architecture Behavioral of andgate is
begin
Y<= A and B ;
end Behavioral;
![Page 3: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/3.jpg)
OR Gate: A logic gate whose output is logic ‘0’ if and only if all of its inputs arelogic ‘0’.
![Page 4: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/4.jpg)
VHDL Code for OR Gate
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity orgate is
Port( A : in std_logic;
B : in std_logic;
Y : out std_logic);
end orgate;
architecture Behavioral of orgate is
begin
Y<= A or B ;
end Behavioral;
![Page 5: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/5.jpg)
NOT Gate: A logic gate whose output is complement of its input.
![Page 6: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/6.jpg)
VHDL Code for NOT Gate
![Page 7: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/7.jpg)
NAND gate: A logic gate which gives logic ‘0’ output if and only if all of itsinputs are logic ‘1’
Truth table Logic diagram
![Page 8: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/8.jpg)
VHDL Code for NAND Gate
![Page 9: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/9.jpg)
NOR gate: A logic gate whose output logic ‘1’ if and only if all of its inputs arelogic ‘0’.
Truth table Logic diagram
![Page 10: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/10.jpg)
VHDL Code for NOR Gate
![Page 11: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/11.jpg)
EX-OR (Exclusive OR): A logic gate whose output is logic ‘0’ when all the inputs are equal and logic ‘1’ when they are un equal.
![Page 12: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/12.jpg)
VHDL Code for EX-OR Gate
![Page 13: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/13.jpg)
EX-NOR (Exclusive -NOR) gate: A logic gate that produces a logic ‘1’ only whenthe two inputs are equal.
Truth table Logic diagram
![Page 14: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/14.jpg)
VHDL Code for EX-NOR Gate
![Page 15: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/15.jpg)
Half Adder: A logic circuit for the addition of two one bit numbers is called half adder (sum and carry are output).
Truth table Logic diagram
![Page 16: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/16.jpg)
VHDL Code for HALF ADDERlibrary IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity HA is
port(
A,B : in STD_LOGIC;
S,CY : out STD_LOGIC);
end HA;
architecture HA_arch of HA is
begin
S<= A XOR B;
CY<= A AND B;
end HA_arch;
![Page 17: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/17.jpg)
Full Adder: a logic circuit that accepts two one-bit signal and Carry-in as inputs and produces their sum and carry as outputs.
Truth table Logic diagram
![Page 18: AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’](https://reader036.vdocuments.site/reader036/viewer/2022081503/56649db35503460f94aa2c62/html5/thumbnails/18.jpg)
VHDL Code for FULL ADDER
library IEEE;
use IEEE.std_logic_1164.all;
entity FA is
port(A,B,Cin : in STD_LOGIC;
SUM,CARRY : out STD_LOGIC);
end FA;
architecture LogicFunc of FA is
begin
SUM<= A XOR B XOR Cin;
CARRY<= (A AND B) OR (Cin AND A)OR (Cin AND B);
end LogicFunc;