summaryrefslogtreecommitdiff
path: root/Example/logic_gates/and_gate.vhdl
blob: 689bcbad5694aa58a0c91e66e72497a4bd68411c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
library ieee;

use ieee.std_logic_1164.all;

entity and_gate is

port(    a: in std_logic;
         b: in std_logic;
         c: out std_logic
);

end and_gate;

architecture beh of and_gate is

    begin

    process(a, b)

    begin

    if (a='1' and b='1') then
        c <= '1';

    else 

	c <= '0';

    end if;

    end process;

end beh;