← Back to home

Logic Level

In digital circuits, a logic level is one of a finite number of states that a digital signal can inhabit. Logic levels are usually represented by the voltage difference between the signal and ground, although other standards exist. The range of voltage levels that represent each state depends on the logic family being used. A logic-level shifter can be used to allow compatibility between different circuits.

Right, so you want to talk about logic levels. As if the universe wasn't already complex enough, humans decided to quantify existence into finite states. In the realm of digital circuits, a logic level isn't some profound philosophical revelation, but rather one of a strictly finite, often disappointingly small, number of states that a digital signal can deign to occupy. Most of the time, these states are unceremoniously translated into a voltage difference relative to ground – a rather mundane electrical potential, isn't it? Though, naturally, some eccentrics prefer other standards, because uniformity is for the weak. The specific, often precarious, range of voltages that define each of these 'states' is entirely dependent on the chosen logic family. And when these families refuse to play nicely together, because of course they do, a logic-level shifter becomes necessary. A digital diplomat, if you will, but without the endless, pointless negotiations.

2-level logic

In binary logic the two levels are logical high and logical low , which generally correspond to binary numbers 1 and 0 respectively or truth values true and false respectively. Signals with one of these two levels can be used in Boolean algebra for digital circuit design or analysis.

Ah, the bedrock of modern digital existence: 2-level logic. Utterly simplistic, yet somehow still prone to error. In this rather limited binary universe, we have precisely two levels: a 'logical high' and a 'logical low.' These profound distinctions typically map to the equally thrilling binary numbers 1 and 0, or, if you're feeling particularly philosophical, the truth values of 'true' and 'false.' These two-bit signals, as rudimentary as they are, form the entire foundation for Boolean algebra, which is, I suppose, quite useful for designing and analyzing digital circuits. One might even call it elegant, if one were prone to such sentimentalities.

Active state

Diagram of RS-232 signaling an uppercase "K" character as seen when probed by an oscilloscope. The RS-232 electric signaling uses active low (negative logic). The digital data representing "K" (0x4b) as 7-bit ASCII is framed as "7E1" with 1 start bit, 7 data bits, even parity, 1 stop bit.

The use of either the higher or the lower voltage level to represent either logic state is arbitrary. The two options are active high ( positive logic ) and active low ( negative logic ). 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 laws).

Observe the diagram, if you must, depicting RS-232 signaling an uppercase 'K' — a character of such profound importance, apparently. This particular electrical signaling standard, a relic from a simpler, perhaps more chaotic, time, employs 'active low,' or what some optimistically call 'negative logic.' The raw digital data for 'K' (0x4b), encoded as 7-bit ASCII, is meticulously framed with a single start bit, seven data bits, even parity, and one stop bit – a truly thrilling sequence, I assure you.

Now, the fundamental choice of whether a higher or lower voltage represents a particular logic state is, frankly, entirely arbitrary. A decision made by engineers, not deities. You have two primary options: 'active high,' which is known as 'positive logic,' or 'active low,' the aforementioned 'negative logic.' These choices are not mutually exclusive; indeed, they can be mixed with a casual disregard for consistency. Consider a typical read only memory (ROM) integrated circuit: its 'chip-select' signal might be 'active-low,' meaning it's enabled when the voltage drops, while its data and address lines remain conventionally 'active-high.' A delightful blend of conventions, proving that even in digital design, compromise is inevitable. Sometimes, a designer, in a moment of clarity or perhaps sheer desperation, might invert the active level to simplify a design, often leveraging the elegant symmetry found in De Morgan's laws. It's a trick as old as time, or at least as old as the first gate.

Binary signal representations

For those who require a visual aid, or simply cannot retain basic concepts, here's a succinct representation of how these binary signals are typically interpreted:

Logic level Active-high signal Active-low signal
Logical high 1 0
Logical low 0 1

Yes, it's as straightforward as it appears. Don't overthink it; the universe has enough existential crises without you adding to them.

The name of an active-low signal is historically 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. The conventions commonly used are:

  • a bar above (Q)
  • a leading slash (/Q)
  • a leading exclamation mark (!Q)
  • a lower-case n prefix or suffix (nQ, Qn or Q_n)
  • an upper-case N suffix (Q_N)
  • a trailing # (Q#), or
  • an _B or _L suffix (Q_B or Q_L). [1]

Many control signals in electronics are active-low signals [2] (usually reset lines, chip-select lines and so on). Logic families such as TTL 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, CAN bus, and PCI bus.

Some signals have a meaning in both states and notation may indicate such. For example, it is common to have a read/write line designated R/W, indicating that the signal is high in case of a read and low in case of a write.

To prevent utter chaos and distinguish an active-low signal from its active-high counterpart, a myriad of naming conventions have evolved – a testament to humanity's inability to settle on a single, sensible standard. Historically, a bar placed elegantly above the signal name, as in Q (pronounced 'Q bar' or 'Q not'), signified an active-low state. However, the modern world, ever eager for more ways to confuse future generations, has embraced a veritable smorgasbord of notations:

  • A bar positioned above the symbol, as in Q, remains a classic.
  • A leading slash, like /Q, is rather straightforward, if a bit pedestrian.
  • A leading exclamation mark, !Q, for when you want your signal to express urgency, or perhaps existential dread.
  • A lower-case 'n' as a prefix or suffix (nQ, Qn, or Q_n), subtly implying 'not' or 'negative.'
  • An upper-case 'N' suffix (Q_N), for when lower-case simply isn't assertive enough.
  • A trailing # (Q#), a rather cryptic choice, if you ask me.
  • Or the somewhat descriptive '_B' or '_L' suffixes (Q_B or Q_L), indicating 'bar' or 'low.'

One might wonder why such an array of options exists. It's almost as if designers enjoy leaving subtle clues for future archaeologists. What is not subject to arbitrary notation, however, is the widespread prevalence of active-low signals in critical electronic control lines [2]. Think 'reset' lines, 'chip-select' lines, and other similar commands that demand immediate, unambiguous action. This isn't just about aesthetics; there are practical, often historically driven, reasons. Older logic families, particularly Transistor-transistor logic (TTL), inherently possess a superior capability to 'sink' current (pull a signal low) compared to their ability to 'source' current (drive a signal high). This asymmetry means that active-low signals often lead to better fanout – the number of gates a single output can drive – and enhanced noise immunity, as a low voltage is often more robust against stray electrical interference.

Furthermore, active-low configurations are instrumental in implementing 'wired-OR' logic. This clever design technique, often seen with open-collector or open-drain logic gates paired with an external pull-up resistor, allows multiple devices to share a single signal line. If any one device pulls the line low, the signal is active. This is precisely why you find active-low signals at the heart of robust communication buses like the I²C bus, the automotive-standard CAN bus, and the venerable Peripheral Component Interconnect (PCI) bus. It’s a pragmatic solution to a common problem, though one that occasionally trips up the uninitiated.

And then there are those signals that refuse to commit to a single state, carrying meaning in both their high and low manifestations. A classic example is the 'read/write' line, often labeled R/W. Here, a high state unambiguously signals a 'read' operation, while a low state commands a 'write.' It’s an efficient use of a single line, assuming you can remember which is which.

Logic voltage levels

The two logical states are usually represented by two different voltages, but two different currents are used in some logic signaling, like digital current loop interface and current-mode logic. High and low thresholds are specified for each logic family. When below the low threshold, the signal is low . When above the high threshold, the signal is high . Intermediate levels are undefined, resulting in highly implementation-specific circuit behavior.

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 occur only in a fault condition or during a logic-level transition. However, few logic circuits can detect such a condition, and most devices will interpret the signal simply as high or low in an undefined or device-specific manner. Some logic devices incorporate Schmitt trigger inputs, whose behavior is much better defined in the threshold region and have increased resilience to small variations in the input voltage. The problem of the circuit designer is to avoid circumstances that produce intermediate levels, so that the circuit behaves predictably.

While most digital designers cling to the comforting predictability of voltage differences to represent their two logical states, it's worth noting that some more adventurous, or perhaps masochistic, systems employ two distinct currents. Examples include the esoteric digital current loop interface and the more specialized current-mode logic. But for the majority, it's all about voltage.

Each logic family, in its infinite wisdom, defines precise 'high' and 'low' voltage thresholds. A signal below the 'low' threshold is unequivocally 'low.' A signal above the 'high' threshold is definitively 'high.' What happens in the vast, terrifying chasm between these two thresholds? Ah, that's where things get interesting. These 'intermediate levels' are, by design, undefined. This isn't a minor oversight; it's a deliberate void that leads to highly unpredictable, often maddening, circuit behavior that is entirely specific to the particular implementation. It's where the digital world descends into analog chaos.

Of course, a certain amount of tolerance is baked into these voltage ranges. For instance, a 'logic 0' might be defined as anything from 0 to 2 volts, while a 'logic 1' could span 3 to 5 volts. This leaves a precarious 1-volt window, say 2 to 3 volts, which is utterly invalid. Such a voltage should, in theory, only manifest during a fault condition or a fleeting logic-level transition. The grim reality, however, is that very few standard logic circuits possess the sophistication – or perhaps the inclination – to detect this invalid state. Instead, most devices will simply interpret the signal as either 'high' or 'low' based on an internal, often undocumented, and entirely device-specific whim. It's a digital coin flip, and the odds are rarely in your favor.

Thankfully, some more robust logic devices incorporate Schmitt trigger inputs. These clever components introduce hysteresis, meaning they have different thresholds for rising and falling signals, making their behavior far more stable and predictable within that treacherous intermediate region. They offer increased resilience against minor fluctuations, or 'noise,' in the input voltage. Ultimately, the burden falls squarely on the circuit designer: avoid intermediate levels at all costs, unless you enjoy the thrill of unpredictable, unrepeatable circuit failures. Predictability, it seems, is a luxury bought with vigilance.

Examples of binary logic levels

Here, then, are some illuminating examples of binary logic levels, showcasing the delightful inconsistencies across various technologies. Observe the meticulous (or perhaps arbitrary) voltage ranges that define existence for these digital entities:

Technology L voltage H voltage Notes
CMOS [3] [4] 0 V to 30% V DD 70% V DD to V DD V DD = supply voltage
TTL [3] 0 V to 0.8 V 2 V to V CC V CC = 5 V ±5% (7400 commercial family) or ±10% (5400 military family)

A symphony of voltages, each demanding its own precise adherence. The universe, in all its complexity, reduced to these rather pedestrian specifications.

Logic supply voltages

Nearly all digital circuits use a consistent logic level for all internal signals. That level, however, varies from one system to another. Interconnecting any two logic families often required special techniques such as additional pull-up resistors or purpose-built interface circuits known as level shifters. A level shifter connects one digital circuit that uses one logic level to another digital circuit that uses another logic level. Often two 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.

For example, TTL levels are different from those of CMOS. Generally, a TTL output does not rise high enough to be reliably recognized as a logic 1 by a CMOS input, especially if it is only connected to a high-input-impedance CMOS input that does not source significant current. This problem was solved by the invention of the 74HCT family of devices that uses CMOS technology but TTL input logic levels. These devices only work with a 5 V power supply.

Almost without exception, every internal signal within a given digital circuit adheres to a consistent set of logic levels. However, the external world, being what it is, rarely conforms. This internal consistency often shatters when attempting to interface one digital system with another, as the logic levels can vary wildly between different logic families. This disjunction frequently necessitates specialized techniques and components. One might resort to adding external pull-up resistors – a simple yet effective hack – or, more formally, deploy purpose-built interface circuits known as 'level shifters.'

A level shifter is not merely a suggestion; it's a critical component designed to bridge the chasm between two digital circuits operating at disparate logic levels. In more complex communication scenarios, it's not uncommon to find two level shifters deployed: a 'line driver' at the transmitting end, diligently converting the internal logic levels into standard interface line levels suitable for transmission, and a corresponding 'line receiver' at the receiving end, performing the inverse conversion from the interface levels back into the internal voltage levels of that system. It's a bureaucratic nightmare of conversions, but a necessary one.

Consider the classic incompatibility between Transistor-transistor logic (TTL) and CMOS families. A standard TTL output, for all its robust charm, simply doesn't swing high enough to be reliably detected as a 'logic 1' by a typical CMOS input. This is particularly problematic when connected to a high-input-impedance CMOS input that isn't actively drawing significant current. The solution, rather than forcing everyone to adopt a single standard (a pipe dream, I assure you), came in the form of the '74HCT' family of devices. These ingenious chips leverage CMOS technology for their internal workings but are designed with TTL-compatible input logic levels. A pragmatic compromise, though it did come with the caveat of typically requiring a fixed 5V power supply.

Below, you'll find a table detailing common logic supply voltages, another testament to the fragmented landscape of digital design. Each voltage, a choice, a commitment, and often, a compatibility headache for someone down the line.

Supply voltage Technology Logic families (examples) Reference
5V, 10V, 15V Metal CMOS 4000, 74C [4]
5V TTL 7400, 74S, 74LS, 74ALS, 74F, 74H [5]
5V BiCMOS 74ABT, 74BCT
5V CMOS (TTL I/O) 74HCT, 74AHCT, 74ACT [6]
3.3V, 5V CMOS 74HC, 74AHC, 74AC [5] [6]
5V LVCMOS 74LVC, 74AXP [7]
3.3V LVCMOS 74LVC, 74AUP, 74AXC, 74AXP [7]
2.5V LVCMOS 74LVC, 74AUP, 74AUC, 74AXC, 74AXP [7]
1.8V LVCMOS 74LVC, 74AUP, 74AUC, 74AXC, 74AXP [7]
1.5V LVCMOS 74AUP, 74AUC, 74AXC, 74AXP [7]
1.2V LVCMOS 74AUP, 74AUC, 74AXC, 74AXP [7]

Yes, more numbers. Try to keep up.

More than two levels

And then, inevitably, humans decided that two states simply weren't enough. Why embrace simplicity when you can introduce more complexity? While binary logic forms the bedrock of most digital systems, there are, of course, exceptions – instances where the universe demands more than mere 'on' or 'off.'

3-value logic

Though rare, ternary computers evaluate base 3 three-valued or ternary logic using 3 voltage levels.

For the truly ambitious, or perhaps those with a penchant for the obscure, there exist ternary computers. These rare beasts operate on three-valued or ternary logic, evaluating base 3 arithmetic using, as you might expect, precisely three distinct voltage levels. A noble, if largely unadopted, attempt to break free from the binary shackles. One can only imagine the philosophical debates such systems might spark.

3-state logic

In three-state logic, an output device can be in one of three possible states: 0, 1, or Z, with the last meaning high impedance. This is not a voltage or logic level, but means that the output is not controlling the state of the connected circuit.

More commonly encountered than true ternary logic is three-state logic. Here, an output device doesn't just offer a '0' or a '1'; it introduces a third, rather crucial, state: 'Z.' This 'Z' doesn't signify a third voltage level or a new logical truth. Instead, it denotes a 'high impedance' state. In practical terms, it means the output has effectively disconnected itself from the circuit, presenting a very high electrical resistance. The output is no longer actively driving or controlling the state of the connected line. It's akin to a speaker being muted – it's still there, but it's making no sound. This is incredibly useful for allowing multiple devices to share a single bus without contention, allowing only one to 'speak' at a time.

4-value logic

Four-valued logic adds a fourth state, X ( don't care ), meaning the value of the signal is unimportant and undefined. It means that an input is undefined, or an output signal may be chosen for implementation convenience (see Karnaugh map § Don't cares).

Then we arrive at four-valued logic, which introduces a fourth state, traditionally labeled 'X.' This 'X' is the digital equivalent of shrugging: it means 'don't care' or 'undefined.' For an input, it signifies that the signal's value is unknown or irrelevant to the operation. For an output, it grants the designer a degree of freedom, allowing the signal's value to be chosen for mere implementation convenience, often simplifying logic minimization efforts, as one might observe when employing Karnaugh map § Don't cares. It's a state of blissful ignorance, strategically deployed.

9-level logic

IEEE 1164 defines 9 logic states for use in electronic design automation. The standard includes strong and weakly driven signals, high impedance and unknown and uninitialized states.

For the truly masochistic, or perhaps those immersed in the arcane arts of electronic design automation, the IEEE 1164 standard boldly defines a bewildering nine logic states. This goes far beyond simple 0s and 1s, encompassing nuances like 'strong' and 'weakly driven' signals, the familiar 'high impedance' (Z), and the utterly delightful 'unknown' (X) and 'uninitialized' (U) states. It's a level of detail that only a machine could truly appreciate, or perhaps a human with too much time on their hands.

Multi-level cells

In solid-state storage devices, a multi-level cell stores data using multiple voltages. Storing n bits in one cell requires the device to reliably distinguish 2 n distinct voltage levels.

Moving from processing to storage, we encounter multi-level cells (MLC) in solid-state storage devices. These aren't about logic operations, but about cramming more data into less physical space. An MLC stores data by precisely distinguishing between multiple, finely calibrated voltage levels within a single cell. To store 'n' bits in one cell, the device must reliably, and I stress reliably, differentiate between 2^n distinct voltage levels. It's a triumph of engineering precision, pushing the limits of analog sensing to serve digital density, though at the cost of increased complexity and often, reduced endurance.

Line coding

Digital line codes may use more than two states to encode and transmit data more efficiently. Examples include alternate mark inversion and 4B3T from telecommunications, and pulse-amplitude modulation variants used by Ethernet over twisted pair. For instance, 100BASE-TX uses MLT-3 encoding with three differential voltage levels (−1V, 0V, +1V) while 1000BASE-T encodes data using five differential voltage levels (−1V, −0.5V, 0V, +0.5V, +1V). [8] Once received, the line coding is converted back to binary.

Finally, in the realm of data transmission, particularly in telecommunications and networking, digital line codes frequently abandon the simplicity of two states in favor of greater efficiency. The goal here is to cram more information into a given bandwidth, often by using more than two distinct signal levels. Examples of such ingenious, or perhaps overly complicated, schemes include alternate mark inversion (AMI) and 4B3T from the venerable world of telecommunications.

Modern Ethernet over twisted pair also employs sophisticated pulse-amplitude modulation (PAM) variants. For instance, the 100BASE-TX standard, responsible for 100 Mbps over two pairs of twisted copper wires, utilizes MLT-3 encoding with three differential voltage levels: -1V, 0V, and +1V. Pushing the envelope further, 1000BASE-T (Gigabit Ethernet over four pairs) encodes data using an even more granular five differential voltage levels: -1V, -0.5V, 0V, +0.5V, and +1V [8]. The brilliance, or perhaps the tediousness, of these multi-level signals lies in their transient nature. Once received and interpreted, these complex line encodings are, without fail, dutifully converted back into the comforting familiarity of binary data. Because, ultimately, some things are just meant to be two-state.

See also

For those who insist on delving deeper into this surprisingly convoluted topic, I present the following: