# Logic Gate, negative voltage

I am new to electronics... Can a logical gate treat negative voltage as a logical 0 and the ground voltage as logical 1 ? Or should the voltages allways be between 0 and +12V ?

• First you should understand the meaning of the word "voltage". It is a difference of potentials, not an absolute value. Now. Can you answer your question yourself? Jun 21, 2016 at 14:45
• Yes. If you connect VDD to GND and VSS to -12V. But the output will be in the same range. Jun 21, 2016 at 14:53
• Some logic standards use "ground" as the logic high state and a negative voltage as the logic low state. Consider starting with en.wikipedia.org/wiki/Logic_level#Logic_voltage_levels Jun 21, 2016 at 15:11
• I meant voltages with respect to the ground voltage (0) ... I do understand the difference between voltage and potential. Jun 21, 2016 at 15:27
• Similarly, I have seen digital logic used to gate high-side drivers where VDD went to the high-voltage and VSS was derived to be VDD - 12V. The inputs were level-shifted using opto-isolators.
– Tut
Jun 21, 2016 at 15:29

1) 0 and 1 are just to make things easy for humans.

You could also call a certain voltage range False and another one True.

You could even call them Bert and Ernie if you like but that's confusing for humans, also 0 and 1 is more compact to write down.

In the same way, if you wanted a circuit where + 5 V is 0 (zero) and 0 V is 1 (One) then be my guest. It's just a naming convention. The transistors don't care either.

2) A circuit with a +12 V and a 0 V (ground) has +12 V just because it was chosen to be like that. You could also connect that + 12 V node to ground instead but now, since it's ground, we don't refer to it as +12 V anymore because that is confusing. Now we call it ground and then the node that was previously ground is now called - 12 V

In this circuit the traditional 1 (one) would be 0 Volt and the traditional 0 (zero) would be -12 V.

In the early days of logic chips some used a common positive so all voltages in the circuit were negative ! A bit confusing now since almost no one does that anymore but it is possible nonetheless. Ground is just a reference the designer chooses.

• If I understand this correct, I can arbitrarily set 0 to -5V and 1 to 0V... So if i take a AND gate and connect -5V to one terminal and 0V to the other , I should get -5V ---> 0 at the output ? Jun 21, 2016 at 15:34
• The inputs and outputs of logic gates must always be between the power supply rails, whatever voltage you wish to call them. Jun 21, 2016 at 15:44