Wednesday 11 December 2013

FULL SUBTRACTOR-(Behavioral)



library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity FA is
    Port ( A,B,C : in  STD_LOGIC;
           Diff,Borw: out  STD_LOGIC);
end FA;
architecture Behavioral of HA is
begin
process(A,B,C)
begin
if(A='0') then
            Diff<=B xor C ; Borw<=B or C ;
else 
            Diff<=B xnor C ; Borw<=B and C ;
end if;
end process;
end Behavioral;

No comments:

Post a Comment