summaryrefslogtreecommitdiff
path: root/Example/logic_gates/nand_gate.vhdl
blob: 373628569142369a7c3b40678ae1b3f08c93212b (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 nand_gate is

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

end nand_gate;

architecture beh of nand_gate is

    begin

    process(a, b)

    begin

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

    else 

	c <= '1';

    end if;

    end process;

end beh;