Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. -------------------------------------------------------------------------------
  2. -- File Downloaded from http://www.nandland.com
  3. -------------------------------------------------------------------------------
  4. library ieee;
  5. use ieee.std_logic_1164.all;
  6. use ieee.numeric_std.all;
  7.  
  8. entity half_adder is
  9. port (
  10. i_bit1 : in std_logic;
  11. i_bit2 : in std_logic;
  12. --
  13. o_sum : out std_logic;
  14. o_carry : out std_logic
  15. );
  16. end half_adder;
  17.  
  18. architecture rtl of half_adder is
  19. begin
  20. o_sum <= i_bit1 xor i_bit2;
  21. o_carry <= i_bit1 and i_bit2;
  22. end rtl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement