Wednesday 11 December 2013

HALF-SUBTRACTOR-(Behavioral)



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

No comments:

Post a Comment