OR Logic Gate Simulator – Free

This OR gate simulator evaluates a two-input OR. Choose a value for each input and the result is 1 if either one, or both, is 1.

How to use the OR Gate Simulator tool

  1. Select a value for Input A: 1 or 0.
  2. Select a value for Input B: 0 or 1.
  3. Select Calculate to evaluate A OR B.
  4. Read the output in the Result box. Try all four input pairs to reproduce the truth table.
  5. Select Copy to copy the output bit, or Clear to restore the starting values.

OR gate truth table

An OR gate outputs 1 when at least one input is 1. Only the pair 0 and 0 produces 0. This is the inclusive OR: the case where both inputs are 1 also counts as true.

The form opens with Input A at 1 and Input B at 0, so the first result you get is 1.

A  B  A OR B
0  0    0
0  1    1
1  0    1
1  1    1

Boolean identities to test with the OR gate simulator

In Boolean algebra OR is written with a plus sign, as in A + B, or with the logical symbol that looks like a small v. A few identities describe its behavior completely for one-bit values.

  • A OR 0 = A. Zero is the identity element.
  • A OR 1 = 1. A single high input forces the output high.
  • A OR A = A. Repeating an input changes nothing.
  • A OR B = B OR A. The order of inputs does not matter.
  • NOT (A OR B) = (NOT A) AND (NOT B). This is De Morgan's law, and the left side is the NOR gate.

How the result is computed

Each list supplies a one-bit binary number. The tool combines them with a bitwise OR and prints the single resulting bit. There is no timing, propagation delay or voltage model: the simulator shows the ideal logic value only.

For operands wider than one bit, switch to the Bitwise OR Calculator. It ORs two binary words one position at a time, which is how flags are combined into a bit mask in code.

Where OR logic appears

In software, a bitwise OR sets bits: writing flags OR mask turns on every bit that is 1 in the mask and leaves the others alone. The logical OR in most languages also short-circuits, skipping its second operand when the first is already true.

In hardware, OR gates merge request lines, such as several interrupt sources into one signal, and form the sum-of-products stage of combinational logic. The 7432 chip provides four two-input OR gates. In CMOS, an OR is normally built as a NOR followed by an inverter, six transistors in total.

Frequently asked questions

When does an OR gate output 0?

Only when every input is 0. For this two-input simulator that means Input A = 0 and Input B = 0. Any 1 on either input makes the output 1.

What is the difference between OR and XOR?

They differ in one row. With both inputs at 1, OR outputs 1 and XOR outputs 0. OR means one or the other or both, while XOR means one or the other but not both.

Is the OR gate inclusive or exclusive?

Inclusive. The standard OR gate is true when both inputs are true. The exclusive form is a separate gate, XOR, with its own simulator on this site.

How do I simulate a three-input OR gate?

Chain two evaluations. Calculate A OR B, then enter that result as Input A with your third signal as Input B. OR is associative, so the grouping does not change the answer.

Can an OR gate be made from NAND gates?

Yes, with three of them. Invert A and B separately by wiring each to both inputs of its own NAND gate, then NAND the two inverted signals. De Morgan's law shows the result equals A OR B.

Related tools