HOME

TheInfoList



OR:

In
digital circuit In theoretical computer science, a circuit is a model of computation in which input values proceed through a sequence of gates, each of which computes a function. Circuits of this kind provide a generalization of Boolean circuits and a mathematica ...
s, a logic level is one of a finite number of
states State most commonly refers to: * State (polity), a centralized political organization that regulates law and society within a territory **Sovereign state, a sovereign polity in international law, commonly referred to as a country **Nation state, a ...
that a
digital signal A digital signal is a signal that represents data as a sequence of discrete values; at any given time it can only take on, at most, one of a finite number of values. This contrasts with an analog signal, which represents continuous values; ...
can inhabit. Logic levels are usually represented by the
voltage Voltage, also known as (electrical) potential difference, electric pressure, or electric tension, is the difference in electric potential between two points. In a Electrostatics, static electric field, it corresponds to the Work (electrical), ...
difference between the signal and ground, although other standards exist. The range of voltage levels that represent each state depends on the
logic family In computer engineering, a logic family is 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 compati ...
being used. A '' logic-level shifter'' can be used to allow compatibility between different circuits.


2-level logic

In binary logic the two levels are logical high and logical low, which generally correspond to
binary number A binary number is a number expressed in the Radix, base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" (zero) and "1" (one). A ''binary number'' may ...
s 1 and 0 respectively or
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Truth values are used in ...
s ''true'' and ''false'' respectively. Signals with one of these two levels can be used in
Boolean algebra In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
for digital circuit design or analysis.


Active state

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 Read-only memory (ROM) is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture of the memory device. Read-only memory is useful for storing s ...
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 In propositional calculus, propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both Validity (logic), valid rule of inference, rules of inference. They are nam ...
). 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 () * 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). Many control signals in electronics are active-low signals (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 Noise is sound, chiefly unwanted, unintentional, or harmful sound considered unpleasant, loud, or disruptive to mental or hearing faculties. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibratio ...
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 I2C (Inter-Integrated Circuit; pronounced as "" or ""), alternatively known as I2C and IIC, is a synchronous, multi-master/multi-slave, single-ended, serial communication bus invented in 1980 by Philips Semiconductors (now NXP Semiconduct ...
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.


Logic voltage levels

The two logical states are usually represented by two different voltages, but two different
currents Currents, Current or The Current may refer to: Science and technology * Current (fluid), the flow of a liquid or a gas ** Air current, a flow of air ** Ocean current, a current in the ocean *** Rip current, a kind of water current ** Current (hy ...
are used in some logic signaling, like
digital current loop interface For serial communications, a current loop is a communication interface that uses current instead of voltage for signaling. Current loops can be used over moderately long distances (tens of kilometres), and can be interfaced with optically isola ...
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 In electronics, a Schmitt trigger is a comparator circuit with hysteresis implemented by applying positive feedback to the noninverting input of a comparator or differential amplifier. It is an passivity (engineering), active circuit which con ...
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. 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 resistor In electronic logic circuits, a pull-up resistor (PU) or pull-down resistor (PD) is a resistor used to ensure a known state for a signal. More specifically, a pull-up resistor or pull-down resistor ensures that a wire will have a high logic lev ...
s or purpose-built interface circuits known as level shifters. A
level shifter In digital electronics, a level shifter, also called level converter or logic level shifter, or voltage level translator, is a circuit used to translate signals from one logic level or voltage domain to another, allowing compatibility between in ...
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 Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss ", , ) is a type of MOSFET, metal–oxide–semiconductor field-effect transistor (MOSFET) semiconductor device fabrication, fabrication process that uses complementary an ...
. 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.


More than two levels


3-value logic

Though rare,
ternary computer A ternary computer, also called trinary computer, is one that uses ternary logic (i.e., base 3) instead of the more common binary system (i.e., base 2) in its calculations. Ternary computers use trits, instead of binary bits. Types of states ...
s evaluate base 3 three-valued or ternary logic using 3 voltage levels.


3-state logic

In
three-state logic In digital electronics, a tri-state or three-state buffer is a type of digital buffer that has three stable states: a high voltage output state (logical 1), a low output state (logical 0), and a high-impedance (Hi-Z) state. In the Hi-Z state, th ...
, an output device can be in one of three possible states: 0, 1, or Z, with the last meaning
high impedance In electronics, high impedance means that a point in a circuit (a node) allows a relatively small amount of current through, per unit of applied voltage at that point. High impedance circuits are low current and potentially high voltage, whereas ...
. This is not a voltage or logic level, but means that the output is not controlling the state of the connected circuit.


4-value logic

Four valued logic In logic, a four-valued logic is any logic with four truth values. Several types of four-valued logic have been advanced. Belnap Nuel Belnap considered the challenge of question answering by computer in 1975. Noting human fallibility, he was con ...
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 ).


9-level logic

IEEE 1164 The IEEE 1164 standard (''Multivalue Logic System for VHDL Model Interoperability'') is a technical standard published by the IEEE in 1993. It describes the definitions of logic values to be used in electronic design automation, for the VHDL har ...
defines 9 logic states for use in
electronic design automation Electronic design automation (EDA), also referred to as electronic computer-aided design (ECAD), is a category of software tools for designing Electronics, electronic systems such as integrated circuits and printed circuit boards. The tools wo ...
. The standard includes strong and weakly driven signals, high impedance and unknown and uninitialized states.


Multi-level cells

In solid-state storage devices, a
multi-level cell In electronics, a multi-level cell (MLC) is a memory cell (computing), memory cell capable of storing more than a single bit of information, compared to a single-level cell (SLC), which can store only one bit per memory cell. A memory cell typical ...
stores data using multiple voltages. Storing n bits in one cell requires the device to reliably distinguish 2n distinct voltage levels.


Line coding

Digital
line code In telecommunications, a line code is a pattern of voltage, current, or photons used to represent digital data transmission (telecommunications), transmitted down a communication channel or written to a storage medium. This repertoire of signal ...
s may use more than two states to encode and transmit data more efficiently. Examples include
alternate mark inversion In telecommunication, bipolar encoding is a type of return-to-zero (RZ) line code, where two nonzero values are used, so that the three values are +, −, and zero. Such a signal is called a duobinary signal. Standard bipolar encodings are designed ...
and
4B3T 4B3T, which stands for 4 (four) binary 3 (three) ternary, is a line encoding scheme used for ISDN PRI interface. 4B3T represents four binary bits using three pulses. Description It uses three output levels: * + (positive pulse), * 0 (no pulse) ...
from telecommunications, and
pulse-amplitude modulation Pulse-amplitude modulation (PAM) is a form of signal modulation in which the message information is encoded in the amplitude of a pulse train interrupting the carrier frequency. Demodulation is performed by detecting the amplitude level of th ...
variants used by
Ethernet over twisted pair Ethernet over twisted-pair technologies use twisted-pair cables for the physical layer of an Ethernet computer network. They are a subset of all Ethernet physical layers. Early Ethernet used various grades of coaxial cable, but in 1984, Star ...
. For instance,
100BASE-TX In computer networking, Fast Ethernet physical layers carry traffic at the nominal rate of . The prior Ethernet speed was . Of the Fast Ethernet physical layers, 100BASE-TX is by far the most common. Fast Ethernet was introduced in 1995 as t ...
uses
MLT-3 encoding MLT-3 encoding (Multi-Level Transmit) is a line code (a signaling method used in a telecommunication system for transmission purposes) that uses three voltage levels. An MLT-3 interface emits less electromagnetic interference and requires less ba ...
with three differential voltage levels (−1V, 0V, +1V) while
1000BASE-T In computer networking, Gigabit Ethernet (GbE or 1 GigE) is the term applied to transmitting Ethernet frames at a rate of a gigabit per second. The most popular variant, 1000BASE-T, is defined by the IEEE 802.3ab standard. It came into use i ...
encodes data using five differential voltage levels (−1V, −0.5V, 0V, +0.5V, +1V). Once received, the line coding is converted back to binary.


See also

*
Logic family In computer engineering, a logic family is 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 compati ...
*
Digital current loop interface For serial communications, a current loop is a communication interface that uses current instead of voltage for signaling. Current loops can be used over moderately long distances (tens of kilometres), and can be interfaced with optically isola ...


References


External links


Positive Logic (active-high) and Negative logic (active-low )
{{DEFAULTSORT:Logic Level Digital electronics