A NAND Gate has one output and three inputs. The output only turns off when all inputs are on. The output side always faces opposite from the player when placed. Like other Redstone gates, a NAND Gate can be placed on walls and ceilings.
0 + 0 = 1
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0
(Note: 0's represent a INACTIVE redstone signal, 1's represent a ACTIVE redstone signal.)