HOME

TheInfoList



OR:

The OR gate is a digital
logic gate A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic ga ...
that implements
logical disjunction In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor ...
. The OR gate returns true if either or both of its inputs are true; otherwise it returns false. The input and output states are normally represented by different
voltage Voltage, also known as electric pressure, electric tension, or (electric) potential difference, is the difference in electric potential between two points. In a static electric field, it corresponds to the work needed per unit of charge to ...
levels.


Description

The gate accepts two inputs. It outputs a 1 if either or both of these inputs are 1, or outputs a 0 only if both inputs are 0. The inputs and outputs are binary digits (" bits") which have two possible logical states. In addition to 1 and 0, these states may be called true and false, high and low, active and inactive, or other such pairs of symbols. Thus it performs
logical disjunction In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor ...
(∨) from
mathematical logic Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of forma ...
. The gate can be represented with the plus sign (+) because it can be used for logical addition. Equivalently, an OR gate finds the ''maximum'' between two binary digits, just as the AND gate finds the ''minimum''. Together with the AND gate and the NOT gate, the OR gate is one of three basic logic gates from which any Boolean circuit may be constructed. All other logic gates may be made from these three gates; any function in binary mathematics may be implemented with them. It is sometimes called the inclusive OR gate to distinguish it from
XOR Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
, the exclusive OR gate. The behavior of OR is the same as XOR except in the case of a 1 for both inputs. In situations where this never arises (for example, in a full-adder) the two types of gates are interchangeable. This substitution is convenient when a circuit is being implemented using simple
integrated circuit An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small flat piece (or "chip") of semiconductor material, usually silicon. Large numbers of tiny ...
chips which contain only one gate type per chip.


Symbols

There are two logic gate symbols currently representing the OR gate: the American ( ANSI or 'military') symbol and the
IEC The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organization that prepares and publishes international standards for all electrical, electronic and r ...
('European' or 'rectangular') symbol. The
DIN DIN or Din or din may refer to: People and language * Din (name), people with the name * Dīn, an Arabic word with three general senses: judgment, custom, and religion from which the name originates * Dinka language (ISO 639 code: din), spoken by ...
symbol is deprecated. The "≥1" on the ICE symbol indicates that the output is activated by at least one active input.


Hardware description and pinout

OR gates are basic logic gates, and are available in TTL and
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss", ) is a type of metal–oxide–semiconductor field-effect transistor (MOSFET) fabrication process that uses complementary and symmetrical pairs of p-type and n-type MOSF ...
ICs logic families. The standard 4000 series
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss", ) is a type of metal–oxide–semiconductor field-effect transistor (MOSFET) fabrication process that uses complementary and symmetrical pairs of p-type and n-type MOSF ...
IC is the 4071, which includes four independent two-input OR gates. The TTL device is the 7432. There are many offshoots of the original 7432 OR gate, all having the same pinout but different internal architecture, allowing them to operate in different voltage ranges and/or at higher speeds. In addition to the standard 2-input OR gate, 3- and 4-input OR gates are also available. In the CMOS series, these are: * 4075: triple 3-input OR gate * 4072: dual 4-input OR gate Variations include: * 74LS32: quad 2-input OR gate (low power Schottky version) * 74HC32: quad 2-input OR gate (high speed CMOS version) - has lower current consumption/wider voltage range * 74AC32: quad 2-input OR gate (advanced CMOS version) - similar to 74HC32, but with significantly faster switching speeds and stronger drive * 74LVC32: low voltage CMOS version of the same.


Implementations


Analytical representation

f(a,b)=a+b-a*b is the analytical representation of OR gate: * f(0,0)=0+0-0*0=0 * f(0,1)=0+1-0*1=1 * f(1,0)=1+0-1*0=1 * f(1,1)=1+1-1*1=1


Alternatives

If no specific OR gates are available, one can be made from NAND or NOR gates in the configuration shown in the image below. Any logic gate can be made from a combination of NAND or NOR gates.


Wired-OR

With
active low 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 ...
open collector logic outputs, as used for control signals in many circuits, an OR function can be produced by wiring together several outputs. This arrangement is called a ''wired OR''. This implementation of an OR function typically is also found in integrated circuits of N or P-type only transistor processes.


See also

* AND gate * NOT gate * NAND gate * NOR gate * XOR gate * XNOR gate *
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 variables are the truth values ''true'' and ''false'', usually denoted 1 and 0, whereas i ...
*
Logic gate A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic ga ...


References

{{DEFAULTSORT:Or Gate Logic gates Boolean algebra Digital electronics