If I have a 7400 chip with an AND-gate (0 = 0V & 1 = 5V) would it be seen as 0 or 1 if the input is at 2V and also 4V?
3 Answers
At 2v and 4v, both would register as a logic High.
Specs for an average 7400 series chip:
VIH = HIGH Level Input Voltage: 2V Min
VIL = LOW Level Input Voltage: 0.8V Max
Allcircuit tutorial shows:
If a voltage signal ranging between 0.8 volts and 2 volts were to be sent into the input of a TTL gate, there would be no certain response from the gate. Such a signal would be considered uncertain, and no logic gate manufacturer would guarantee how their gate circuit would interpret such a signal.
Fairchild Semi's datasheet shows both a typical and a guaranteed limits. Interestingly, a "Typical" voltage of 1.5v could register as either a Logic HIGH or Logic LOW, showing how unstable this threshold region is (and that 1.5v is the typical cross over voltage, when the chip is running at 3v power).
Note: All outputs loaded; thresholds on input associated with output under test.
The datasheet for the IC will define "threshold" voltages. Below the lower threshold (e.g. 1V) will be treated as zero; above the higher threshold (e.g. 2V) will be treated as 1. Normally there will be a small gray area in the middle between the thresholds. Depending on the IC's construction (TTL or CMOS), it may turn on both the "0" and "1" output transistors, resulting in high power dissipation and possible damage.
"Schmitt trigger" inputs can be used if you want to quantify a signal that is wandering about; these will stay at 0 or 1 until the input is almost at the other end of the voltage scale, then flip over and stick there.
-
\$\begingroup\$ It may be worthwhile to note that while this isn't likely to be an issue with AND gates in particular, the fact that a three-input chip specifies that its output will be high if (among other scenarios) its inputs are 110 or 111 does not imply that the output will necessarily be high if the first two inputs are high and the last one is at an invalid logic level. There's a distinction between "may be high or low" and "don't care", though not all data sheets or logic tools preserve that distinction. \$\endgroup\$– supercatJul 28, 2013 at 19:06
Have a look into the datasheet, for instance here: http://pdf1.alldatasheet.com/datasheet-pdf/view/27345/TI/SN7400.html
According to this datasheet 2V is the minimum voltage for the high level, so you can be sure that 4V represents a high level. For 2V I'm not that sure.
Only one line below the datasheet says, 0.8V is the maximum voltage for a low level.
So, I would say, as level of 2V should be avoided.
If 2V levels are a common situation in your scenario, I would propose to either using a comparator and define the high and low levels on your own or a Schmitt-Trigger (7414) at the beginning of your signal flow.
-
\$\begingroup\$ If 2v is the minimum for a high level, at 2v, you can be sure it represents a high level... \$\endgroup\$– PasserbyFeb 5, 2013 at 13:42
-
1\$\begingroup\$ @Passerby: as long as the 2V are actual 2V and not something between 1.9V and 2.1V. 2V is that close to the edge of a valid logic signal that I would take some efforts to avoid it, if it could appear in a design. \$\endgroup\$ Feb 5, 2013 at 13:45