Ticker

6/recent/ticker-posts

Header Ads Widget


 

Half Subtractor


 Half Subtractor 


 

CODE

 

library IEEE;
use IEEE STD_LOGIC_1164.all;

entity half_sub_df is
    port(a,b:in STD_LOGIC;
            diff, borrow:out STD_LOGIC);
end half_sub_df;

architecture data_flow of half_sub_df is
begin
    diff<=a xor b;
    borrow<=((not a) and b);
                  end data_flow;

Post a Comment

0 Comments