# How do NOT gates work?

Discussion in 'Microcontrollers, Programming and IoT' started by cat6, Sep 18, 2012.

1. ### cat6

10
0
Sep 15, 2012
I'm learning about logic gates and circuit design. Up until this point, I’ve believed (wrongly?) that a logically TRUE state for an input, call it "a", works out physically to a 5v current for TURE and no current at all for false. As such, a NOT gate would simply stop current going into it, which...clearly doesn't make any sense.

Looking at inverters (NOT gates), though, there seems to be something screwy about ‘inverting’ the current to make it backwards (negative?) somehow? Do I have things wrong? Is it really the case that all inputs are electrically ‘on’ all the time and logic is performed by transistors evaluating whether the current is TRUE or FALSE (i.e. ‘normal’ or inverted)?

What’s the deal? What's going on at an electrical level that makes a current True or False?

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,497
2,838
Jan 21, 2010
5V is a voltage not a current, so you need to get that straight in your head.

The other thing you need to realise is that the input(s) to a gate control the output. The (practical) gate has connections to some power source which provides the voltage (and indeed current) for the output.

Logic gates are (at their essence) just really high gain amplifiers that are operated right into their clipping region. So if you're familiar with op-amps, think of an inverter like a non-inverting amplifier without a feedback loop to control the gain. (practically they are different, but mostly because we are interested in optimising them for different behaviour)

Think of an inverter as turning the output on or off.

If the input signal is ON (HIGH, 1, TRUE) then the output is OFF (LOW, 0, FALSE).

If the input signal is OFF (LOW, 0, FALSE) then the output is ON (HIGH, 1, TRUE).

edit: A voltage (or indeed a current) is not intrinsically true or false. We just nominate two values and agree that we will call those sufficiently close to one of them TRUE, and those sufficiently close to the other FALSE.

Last edited: Sep 18, 2012
3. ### donkey

1,293
56
Feb 26, 2011
the gates work of high and low. low is usually 0v and high is a given voltage (5volts is an example)
in a NOT gate its like an opposite gate, whatever the input the output is the opposite. if input is high output is low and vice versa
http://en.wikipedia.org/wiki/Logic_gate offers some very good advice and a few tables to help you out if necessary.

4. ### Harald KappModeratorModerator

11,517
2,652
Nov 17, 2011
Imagine a normally closed relay:

If there is no voltage on the relay coil, the contacts are closed. If a circuit consisting of a lamp and a battery is attached, the lamp will light.

If you connect the coil to a voltage, the coil will be energized and the relay will click. Thus the relay contacts will open and the lamp will turn off.

And for those out there who know better: yes, i know, current is involved. I just tried to keep it simple.