Professional Documents
Culture Documents
Xor
Xor
use IEEE.STD_LOGIC_1164.ALL;
entity OrExclusiva1 is
Port ( A,B : in BIT;
X : out BIT);--DECLARACION DE LAS VARIABLES
end OrExclusiva1;
begin
X <= (A NOR B) NOR (NOT (A NAND B));
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity OrExclusiva2 is
Port ( A : in BIT;
B : in BIT;
X : out BIT);--DECLARACION DE LAS VARIABLES
end OrExclusiva2;
begin
X <= NOT((NOT((NOT A) NAND B))NOR(NOT(A NAND (NOT B))));
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity OrExclusiva3 is
Port ( A,B : in BIT;
S,C : out BIT);
end OrExclusiva3;
begin
S <= A XOR B;
C <= NOT(A NAND B);
end Behavioral;
---------------------------------------------------------------------------------library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity MedioSubstractor is
Port ( A : in BIT;
B : in BIT;
X : out BIT;
P : out BIT);
end MedioSubstractor;
begin
X <= A XNOR B;
P <= ((A NAND '0')NAND B)NAND '0';
end Behavioral;