Logic level
Encyclopedia
In digital circuit
s, a logic level is one of a finite number of states that a signal
can have. Logic levels are usually represented by the voltage
difference between the signal and ground
(or some other common reference point), although other standards exist. The range of voltage levels that represents each state depends on the logic family
being used.
In binary logic the two levels are logical high and logical low, which generally correspond to a binary
1 and 0 respectively. Signals with one of these two levels can be used in boolean logic
for digital circuit design or analysis.
In three-state logic
, an output device can also be high impedance
. This is not a logic level, but means that the output is not controlling the state of the connected circuit.
s or purpose-built interface circuits, since the logic families may use different voltage levels to represent 1 and 0 states, and may have other interface requirements only met within the logic family.
An active-high signal represents a binary digit of 1, or asserted state of a logical condition, by the higher of two voltages. The higher voltage represents a binary 1 or "mark", and the lower voltage represents a binary 0 or "space".
An active-low signal represents a binary digit of 0, or asserted state of a logical condition, by the lower of two voltages.
The slash convention is also used with signals that have a meaning in both states. For example, it is common to have a read/write line written R/W, indicating that the signal is high in case of a read and low in case of a write.
Many control signals in electronics are active-low signals (usually reset lines, chip-select lines and so on). This stems from the fact that most logic families can sink more current
than they can source, so fanout
and noise immunity increase. It also allows for wired-OR logic if the logic gates are open-collector/open-drain with a pull-up resistor. Examples of this are the I²C
bus and the Controller Area Network
(CAN),and the PCI Local Bus. RS232 signaling, as used on some serial port
s, uses active-low signals.
is used in some logic families. A threshold is designed for each logic family. When below that threshold, the wire is "low," when above "high". Intermediate levels are undefined and the behavior of the connected circuits is highly implementation-specific. The problem of the circuit designer is to avoid circumstances that produce intermediate levels, so that all results are predictable.
It is usually 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 circuits cannot instantly change voltage levels. However, few logic circuits can detect such a fault, and most will end up interpreting the signal as either a 0 or a 1 input, unpredictably and possibly inconsistently.
Combinational circuit outputs also take longer to settle to a final state when an input is close to the invalid middle range, and in a synchronous circuit
, this can lead to a propagation of metastability
. A clock domain crossing
is one situation commonly faced by digital designers where metastability is likely and must be handled carefully.
Nearly all digital circuits use a consistent logic level for all internal signals—however, that level varies widely from one system to another.
A level shifter connects one digital circuit that uses one logic level to another digital circuit that uses another logic level.
Often 2 level shifters are used, one at each system:
A "line driver
" converts from internal logic levels to standard interface line levels; a "line receiver" converts from interface levels to internal voltage levels.
The most common agreed-upon voltage levels are the TTL logic levels; almost as common is the RS-232
voltage levels.
The voltage levels used internally are called the "logic level", while the voltage levels used externally are called the "line level
". In particular, when connecting a system that uses TTL levels internally to a RS-232 cable, the TTL levels are the "logic level". When connecting a system that uses 3.3 V CMOS levels internally to a IEEE 1284
bus, the TTL levels are the "line level".
Digital circuit
Digital electronics represent signals by discrete bands of analog levels, rather than by a continuous range. All levels within a band represent the same signal state...
s, a logic level is one of a finite number of states that a signal
Digital signal
A digital signal is a physical signal that is a representation of a sequence of discrete values , for example of an arbitrary bit stream, or of a digitized analog signal...
can have. Logic levels are usually represented by the voltage
Voltage
Voltage, otherwise known as electrical potential difference or electric tension is the difference in electric potential between two points — or the difference in electric potential energy per unit charge between two points...
difference between the signal and ground
Ground (electricity)
In electrical engineering, ground or earth may be the reference point in an electrical circuit from which other voltages are measured, or a common return path for electric current, or a direct physical connection to the Earth....
(or some other common reference point), although other standards exist. The range of voltage levels that represents each state depends on the logic family
Logic family
In computer engineering, a logic family may refer to one of two related concepts. A logic family of monolithic digital integrated circuit devices is a group of electronic logic gates constructed using one of several different designs, usually with compatible logic levels and power supply...
being used.
In binary logic the two levels are logical high and logical low, which generally correspond to a binary
Binary numeral system
The binary numeral system, or base-2 number system, represents numeric values using two symbols, 0 and 1. More specifically, the usual base-2 system is a positional notation with a radix of 2...
1 and 0 respectively. Signals with one of these two levels can be used in boolean logic
Boolean logic
Boolean algebra is a logical calculus of truth values, developed by George Boole in the 1840s. It resembles the algebra of real numbers, but with the numeric operations of multiplication xy, addition x + y, and negation −x replaced by the respective logical operations of...
for digital circuit design or analysis.
In three-state logic
Three-state logic
In digital electronics three-state, tri-state, or 3-state logic allows an output port to assume a high impedance state in addition to the 0 and 1 logic levels, effectively removing the output from the circuit...
, an output device can also be high impedance
High impedance
In electronics, high impedance means that a point in a circuit has a relatively high impedance to other points in the circuit.-Digital electronics:...
. This is not a logic level, but means that the output is not controlling the state of the connected circuit.
The logic level problem
Interconnecting any two logic families often required special techniques such as additional pull-up resistorPull-up resistor
Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected or high-impedance...
s or purpose-built interface circuits, since the logic families may use different voltage levels to represent 1 and 0 states, and may have other interface requirements only met within the logic family.
Active state
The use of either the higher or the lower voltage level to represent either logic state is arbitrary and may even be changed at different levels within a system. Active-high and active-low states can be mixed at will: for example, a read only memory integrated circuit may have a chip-select signal that is active-low, but the data and address bits are conventionally active-high. Occasionally a logic design is simplified by inverting the choice of active level (see De Morgan's theorem).An active-high signal represents a binary digit of 1, or asserted state of a logical condition, by the higher of two voltages. The higher voltage represents a binary 1 or "mark", and the lower voltage represents a binary 0 or "space".
An active-low signal represents a binary digit of 0, or asserted state of a logical condition, by the lower of two voltages.
Conventions
The name of an active-low signal is written with a bar above it to distinguish it from an active-high signal. For example, the name Q, read "Q bar" or "Q not", represents an active-low signal. Other conventions commonly used are:- a leading slash (/Q)
- a leading lower-case n (nQ)
- a trailing #Number signNumber sign is a name for the symbol #, which is used for a variety of purposes including, in some countries, the designation of a number...
(Q#), or - an "_B" suffix (Q_B).
The slash convention is also used with signals that have a meaning in both states. For example, it is common to have a read/write line written R/W, indicating that the signal is high in case of a read and low in case of a write.
Many control signals in electronics are active-low signals (usually reset lines, chip-select lines and so on). This stems from the fact that most logic families can sink more current
Electric current
Electric current is a flow of electric charge through a medium.This charge is typically carried by moving electrons in a conductor such as wire...
than they can source, so fanout
Fanout
In digital electronics, the fan-out of a logic gate output is the number of gate inputs to which it is connected.In most designs, logic gates are connected together to form more complex circuits. While no more than one logic gate output is connected to any single input, it is common for one output...
and noise immunity increase. It also allows for wired-OR logic if the logic gates are open-collector/open-drain with a pull-up resistor. Examples of this are the I²C
I²C
I²C is a multi-master serial single-ended computer bus invented by Philips that is used to attach low-speed peripherals to a motherboard, embedded system, cellphone, or other electronic device. Since the mid 1990s, several competitors I²C ("i-squared cee" or "i-two cee"; Inter-Integrated Circuit;...
bus and the Controller Area Network
Controller Area Network
Controller–area network is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer....
(CAN),and the PCI Local Bus. RS232 signaling, as used on some serial port
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...
s, uses active-low signals.
Logic voltage levels
The two logical states of a wire are usually represented by two different voltages, but currentElectric current
Electric current is a flow of electric charge through a medium.This charge is typically carried by moving electrons in a conductor such as wire...
is used in some logic families. A threshold is designed for each logic family. When below that threshold, the wire is "low," when above "high". Intermediate levels are undefined and the behavior of the connected circuits is highly implementation-specific. The problem of the circuit designer is to avoid circumstances that produce intermediate levels, so that all results are predictable.
It is usually 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 circuits cannot instantly change voltage levels. However, few logic circuits can detect such a fault, and most will end up interpreting the signal as either a 0 or a 1 input, unpredictably and possibly inconsistently.
Combinational circuit outputs also take longer to settle to a final state when an input is close to the invalid middle range, and in a synchronous circuit
Synchronous circuit
A synchronous circuit is a digital circuit in which the parts are synchronized by a clock signal.In an ideal synchronous circuit, every change in the logical levels of its storage components is simultaneous. These transitions follow the level change of a special signal called the clock...
, this can lead to a propagation of metastability
Metastability in electronics
Metastability in electronics is the ability of a digital electronic system to persist for an unbounded time in an unstable equilibrium or metastable state....
. A clock domain crossing
Clock domain crossing
A clock domain crossing , or simply clock crossing, is when a signal crosses from one clock domain into another. If a signal does not assert long enough and is not registered, it may appear asynchronous on the incoming clock boundary....
is one situation commonly faced by digital designers where metastability is likely and must be handled carefully.
Technology | L voltage | H voltage | Notes |
---|---|---|---|
CMOS CMOS Complementary metal–oxide–semiconductor is a technology for constructing integrated circuits. CMOS technology is used in microprocessors, microcontrollers, static RAM, and other digital logic circuits... |
0 V to VDD/2 | VDD/2 to VDD | VDD VCC VCC may refer to:as a three-letter acronym:* Common-collector voltage , plus collector supply line voltage in a common NPN circuit.* Vale of Catmose College, an arts college in England.* Valencia Community College, in Orlando, Florida... = supply voltage |
TTL Transistor-transistor logic Transistor–transistor logic is a class of digital circuits built from bipolar junction transistors and resistors. It is called transistor–transistor logic because both the logic gating function and the amplifying function are performed by transistors .TTL is notable for being a widespread... |
0 V to 0.8 V | 2 V to VCC | VCC = 5 V ±10% |
ECL Emitter coupled logic In electronics, emitter-coupled logic , is a logic family that achieves high speed by using an overdriven BJT differential amplifier with single-ended input, whose emitter current is limited to avoid the slow saturation region of transistor operation.... |
VEE to −1.4 V | −1.2 V to 0 V | VEE is about −5.2 V; VCC=Ground |
Nearly all digital circuits use a consistent logic level for all internal signals—however, that level varies widely from one system to another.
A level shifter connects one digital circuit that uses one logic level to another digital circuit that uses another logic level.
Often 2 level shifters are used, one at each system:
A "line driver
Line driver
In electronics, a line driver is an amplifier used to improve the strength of an analog or digital signal at its source by driving the input to the transmission line with a higher than normal signal level. This increases the quality of a transmission over a long run of cable...
" converts from internal logic levels to standard interface line levels; a "line receiver" converts from interface levels to internal voltage levels.
The most common agreed-upon voltage levels are the TTL logic levels; almost as common is the RS-232
RS-232
In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE and a DCE . It is commonly used in computer serial ports...
voltage levels.
The voltage levels used internally are called the "logic level", while the voltage levels used externally are called the "line level
Line level
Line level is a term used to denote the strength of an audio signal used to transmit analog sound between audio components such as CD and DVD players, TVs, audio amplifiers, and mixing consoles, and sometimes MP3 players....
". In particular, when connecting a system that uses TTL levels internally to a RS-232 cable, the TTL levels are the "logic level". When connecting a system that uses 3.3 V CMOS levels internally to a IEEE 1284
IEEE 1284
IEEE 1284 is a standard that defines bi-directional parallel communications between computers and other devices.-History:In the 1970s, Centronics developed the now-familiar printer parallel port that soon became a de facto standard...
bus, the TTL levels are the "line level".
See also
- Boolean logicBoolean logicBoolean algebra is a logical calculus of truth values, developed by George Boole in the 1840s. It resembles the algebra of real numbers, but with the numeric operations of multiplication xy, addition x + y, and negation −x replaced by the respective logical operations of...
- Digital signalDigital signalA digital signal is a physical signal that is a representation of a sequence of discrete values , for example of an arbitrary bit stream, or of a digitized analog signal...
- Four valued logicFour valued logicIn logic, a four-valued logic is used to model signal values in digital circuits: the four values are Z, X and the boolean values 1 and 0. Z stands for high impedance or open circuit, while X stands for "unknown"...
- High impedanceHigh impedanceIn electronics, high impedance means that a point in a circuit has a relatively high impedance to other points in the circuit.-Digital electronics:...
- Three-state logicThree-state logicIn digital electronics three-state, tri-state, or 3-state logic allows an output port to assume a high impedance state in addition to the 0 and 1 logic levels, effectively removing the output from the circuit...