Facebook
From Cream Eider, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 232
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.all;
  3.  
  4. entity oneBitAdder is
  5.          port(
  6.                  a : in STD_LOGIC;
  7.                  b : in STD_LOGIC;
  8.                  cin : in STD_LOGIC;
  9.                  cout : out STD_LOGIC;
  10.                  s : out STD_LOGIC
  11.              );
  12. end oneBitAdder;
  13.  
  14. --}} End of automatically maintained section
  15.  
  16. architecture oneBitAdder of oneBitAdder is
  17. begin
  18.  
  19. cout <= (a AND b) OR (cin AND (a XOR b));
  20. s <= cin XOR (a XOR b);
  21.  
  22. end oneBitAdder;
  23.