Title: VHDL Program of Not Using Nand
Title: VHDL Program of Not Using Nand
Title: VHDL Program of Not Using Nand
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity notgate is
Port ( A: in STD_LOGIC;
Y: out STD_LOGIC);
end notgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
C: out STD_LOGIC);
end andgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity notgate is
Port ( A: in STD_LOGIC;
Y : out STD_LOGIC);
end notgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
C: out STD_LOGIC);
end andgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity halfadder is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
s: out STD_LOGIC
c: out STD_LOGIC);
end halfadder;
begin
s<=(a xor b) ;
c<=(a and b) ;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity halfsub is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
s: out STD_LOGIC
end halfsub;
begin
s<=(a xor b) ;
bR<=((not a) and b) ;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity fulladder is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
c: in STD_LOGIC;
s: out STD_LOGIC
end fulladder;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity fullsub is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
c: in STD_LOGIC;
s: out STD_LOGIC
end fullsub;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity mux is
I1: in STD_LOGIC;
I2: in STD_LOGIC;
I3: in STD_LOGIC;
s0: in STD_LOGIC;
s1: in STD_LOGIC;
y: out STD_LOGIC);
end mux;
begin
y<=(((i0 and (not s0)) and (not s1)) or ((i1 and (not s0)) and (not s1))) or (((i2 and (not s0)) and (not
s1)) or ((i3 and (not s0)) and (not s1)));
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity notgate is
Port ( a: in STD_LOGIC;
y: out STD_LOGIC);
end notgate;
begin
process(a)
begin
if a=’1’ then
y<=’0’;
else y<=’1’;
end if;
end process;
end behavioral ;
VHDL PROGRAM:
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;
begin
process(a,b)
begin
if a=’0’ then
if b=’0’ then
Y<=’0’;
else Y<=’1’;
end if;
else Y<=’1’;
end process;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
begin
process(a,b)
begin
if a=’1’ then
if b=’1’ then
Y<=’1’;
else Y<=’0’;
end if;
else Y<=’1’;
end if;
end process;
end behavioral ;
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity norgate is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
C: out STD_LOGIC);
end norgate;
begin
process(a,b)
begin
if a=’1’ then
if b=’1’ then
C<=’0’;
else C<=’1’;
end if;
else C<=’1’;
end process;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity nandgate is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
C: out STD_LOGIC);
end nandgate;
begin
process(a,b)
begin
if a=’0’ then
if b=’0’ then
C<=’1’;
else C<=’0’;
end if;
else C<=’0’;
end if;
end process;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity xorgate is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
S: out STD_LOGIC);
end xorgate;
begin
process(a,b)
begin
if a=’0’ then
if b=’0’ then
S<=’0’;
else S<=’1’;
end if;
else
if b=’0’ then
S<=’1’;
else S<=’0’;
end if;
end if;
end process;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity xnorgate is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
C: out STD_LOGIC);
end xnorgate;
begin
process(a,b)
begin
if a=’0’ then
if b=’0’ then
C<=’1’;
else C<=’0’;
end if;
else
if b=’0’ then
C<=’0’;
else o<=’1’;
end if;
end if;
end process;
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity notgate is
Port ( A: in STD_LOGIC;
Y: out STD_LOGIC);
end notgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
begin
Y<=(A or B);
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
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;
C: out STD_LOGIC);
end andgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity xorgate is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
s: out STD_LOGIC);
end xorgate;
begin
end behavioral ;
SIMULATION RESULT:
VHDL PROGRAM:
Library IEEE
Use IEEE.STD_LOGIC_1164.ALL
Use IEEE.STD_LOGIC_ARITH.ALL
Use IEEE.STD_LOGIC_UNSIGNED.ALL
Entity xnorgate is
Port ( a: in STD_LOGIC;
b: in STD_LOGIC;
s: out STD_LOGIC);
end xnorgate;
begin
end behavioral ;
SIMULATION RESULT: