Skip to content
BetterDL

OR gate

Also called: OR logic gate, inclusive OR, inclusive-OR gate, logical OR gate

A logic gate whose output is 1 when at least one input is 1, including when all of them are. It is written A + B, where the + means OR, not addition.

An OR gate outputs 1 when at least one input is 1. It outputs 0 only when every input is 0. For two inputs it is written and read "A or B".

Picture two switches wired side by side, each giving current its own path to a lamp. The lamp lights if either switch is closed, or both. That gives OR's truth table: a single 0, in row 00.

OR is inclusive: "at least one" includes "both". So with A = 1 and B = 1 the output is 1. The gate that leaves out the both-1 case is XOR, and confusing the two is one of the most common slips in the course.

The + sign is borrowed from arithmetic, but it doesn't add. There is no 2 and no carry: 1 + 1 = 1.

The symbol has a curved back, where the inputs enter, and a pointed front.

As a control, OR is the mirror image of AND:

  • A 0 on one input lets the other through: = A.
  • A 1 on one input forces the output to 1: = 1.

OR gates form the second level of every sum of products circuit, and inverting the output gives NOR.

ABY

Worked example

Example

A two-door alarm

Each door sensor outputs 1 when its door is open. The alarm Y must sound if either door is open. Which gate, and what are its outputs?

0000
0111
1011
1110
  1. 1.

    "Either door open" includes both doors open, so this is OR: Y = .

  2. 2.

    Both closed (00): Y = 0.

  3. 3.

    One open (01 or 10): Y = 1.

  4. 4.

    Both open (11): Y = 1. An XOR would stay silent here, which is the wrong behavior for an alarm.

Common mistakes

  • Writing 1 + 1 = 2 or 10. In logic, 1 + 1 = 1.

  • Treating OR as exclusive. OR is 1 when both inputs are 1; only XOR is 0 there.

  • Thinking a 0 input forces the output to 0. That's AND. For OR, only a 1 input takes control.

Practice OR gate

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

OR gate is taught in Logic Gates.