library ieee;
use ieee.std_logic_1164.all;
entity fullsubtractor is
port(A,B,Cin:in std_logic; borrow,difference:out std_logic);
end fullsubtractor;
architecture FS of fullsubtractor is
begin
difference <= A xor B xor Cin;
borrow<= (not A and B) or (not A and Cin) or (B and Cin);
end FS;
Comments
Post a Comment