OR gate (inclusive disjunction) in boolean logic and digital circuits
An OR gate is a fundamental logic gate that outputs true when one or more inputs are true. This article explains its behavior, truth table, implementations, uses, and relations to other logic functions.
Overview
An OR gate is a basic logic gate whose output is true (1) whenever at least one of its inputs is true. This behavior is known as inclusive disjunction and is commonly summed up by the mnemonic "one or the other, or both." In Boolean algebra the OR of A and B is written as A + B.
Image gallery
3 ImagesDefinition and truth table
The OR operation produces a single binary result from two or more binary inputs. For two inputs the truth table is:
- A = 0, B = 0 → Output = 0
- A = 0, B = 1 → Output = 1
- A = 1, B = 0 → Output = 1
- A = 1, B = 1 → Output = 1
Implementations and technology
OR logic can be built with different physical techniques. Simple diode OR circuits are common for wired-OR of open-collector outputs; transistor networks implement OR in discrete designs; integrated circuits implement OR gates in logic families such as TTL and CMOS. In software the equivalent operation is often the logical || operator or a function that tests multiple conditions.
History and development
The OR operation arises directly from Boolean algebra, developed in the 19th century and applied to switching and computing in the 20th century. As digital electronics matured, the OR gate became one of the standard primitives used to construct combinational and sequential circuits.
Uses, examples, and importance
OR gates are used to combine multiple signals where any active input should produce an active output. Typical examples include alarm systems (any sensor triggers alarm), control logic (multiple start inputs), and parts of arithmetic circuits such as generating carry signals. OR operations also appear in conditional programming and database queries.
Distinctions and properties
Important distinctions include inclusive OR versus exclusive OR (XOR), which is true only when inputs differ. Algebraic properties of OR include commutativity, associativity, idempotence (A + A = A), and distribution with AND. By De Morgan's laws, A + B = NOT(NOT A AND NOT B). An OR gate alone is not functionally complete, but combined with NOT it can express any Boolean function.
Related articles
Author
AlegsaOnline.com OR gate (inclusive disjunction) in boolean logic and digital circuits Leandro Alegsa
URL: https://en.alegsaonline.com/art/72902