fork download
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. -- Entity declaration for the AND gate
  5. entity AND_Gate is
  6. Port (
  7. A : in STD_LOGIC; -- First input
  8. B : in STD_LOGIC; -- Second input
  9. Y : out STD_LOGIC -- Output
  10. );
  11. end AND_Gate;
  12.  
  13. -- Architecture definition
  14. architecture Behavioral of AND_Gate is
  15. begin
  16. -- Process to implement the AND logic
  17. Y <= A and B; -- Output Y is the logical AND of inputs A and B
  18. end Behavioral;
Success #stdin #stdout 0.03s 25948KB
stdin
Standard input is empty
stdout
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Entity declaration for the AND gate
entity AND_Gate is
    Port (
        A : in STD_LOGIC;  -- First input
        B : in STD_LOGIC;  -- Second input
        Y : out STD_LOGIC   -- Output
    );
end AND_Gate;

-- Architecture definition
architecture Behavioral of AND_Gate is
begin
    -- Process to implement the AND logic
    Y <= A and B;  -- Output Y is the logical AND of inputs A and B
end Behavioral;