AI worksheet builder and 715 free math exercise generators — no subscription or registration required. Optional tips help keep them free. Tip →

Article

Bitwise OR

Go to Math Operation

Bitwise OR: how it works

The bitwise OR compares two binary numbers one bit at a time. For each position, the result is 1 if at least one of the two bits is 1; otherwise the result is 0.

Method

  1. Write the numbers in binary and line them up by place value.
  2. Compare each pair of bits from right to left.
  3. Use this rule:
    • 0 OR 0 = 0
    • 0 OR 1 = 1
    • 1 OR 0 = 1
    • 1 OR 1 = 1
  4. Combine the results to get the final binary answer.
  5. If needed, simplify the answer by writing it in the required final form.

Helpful check

Make sure the result has a 1 in every place where either original number had a 1. A good quick check is to compare the final binary number with the inputs bit by bit.

Example idea

If one number has a 1 in a certain position, the OR result must also have a 1 there. Only positions where both numbers have 0 stay 0.

Final review

Before submitting, recheck each bit separately. One small mistake in a single position changes the whole answer.

© 2023-2026 AI MATH COACH