Digital circuits are electric circuits based on a number of discrete voltage levels. In most cases there are two voltage levels: one near to zero volts and one at a higher level depending on the supply voltage in use. These two levels are often represented as L and H.
Levels
The two levels are used to represent the binary integers or logic levels of 0 and 1. In active-high logic, L represents binary 0 and H represents binary 1. Active-low logic uses the reverse representation. It is usual to allow some tolerance in the voltage levels used; for example, 0 to 2 volts might represent logic 0, and 3 to 5 volts logic 1. A voltage of 2 to 3 volts would be invalid and would occur only in a fault condition or during a logic level transition, as most circuits are not purely resistive, and therefore cannot instantly change voltage levels. However, few logic circuits can detect such a fault, and most will just choose to interpret the signal randomly as either a 0 or a 1.
Examples of binary logic levels:
| Technology |
L voltage |
H voltage |
Notes |
| CMOS |
0V to VCC/2 |
VCC/2 to VCC |
VCC = supply voltage |
| TTL |
0V to 0.8V |
2V to VCC |
VCC is 4.75V to 5.25V |
It is possible to construct digital circuits in forms other than electronic. In principle, any technology capable of representing two discrete states and performing Boolean operations could be used to build a logic circuit. Hydraulic, pneumatic and mechanical versions of logic gates exist and are used in situations where electricity cannot be used. The first two types are considered under the heading of fluidics. One application of fluidic logic is in military hardware that is likely to be exposed to a nuclear electromagnetic pulse (nuclear EMP, or NEMP) that would destroy any electrical circuits.