Bitwise Or Calculator

Written by:

Here is a bitwise or calculator, for performing an or between the bits of two numbers converted to 32-bit binary. In a bitwise or, a binary digit will only be set to 1 if either numbers have a 1 in that spot, otherwise it'll set to 0.

Bitwise Or Calculator

Using the Bitwise Or Calculator

To use the bitwise or calculator, enter two numbers to or in the "Number One" and "Number Two" fields in the tool. Once happy with your inputs, click the "Calculate Bitwise Or" button.

The result of the bitwise or will show up in the "Or'd Number" field, converted back to integer already:

Bitwise or of 4 and 5 in the tool
Result of a bitwise or of 4 and 5

Bitwise Or Example

Behind the scenes, the tool converts the numbers to 32-bit binary numbers, then goes digit by digit and ors the two numbers together.

Let's do an example together, matching the screenshot (oring the numbers 4 and 5).

101|100=101\  (5)

Shown above, the tool converted the numbers 5 and 4 to the binary numbers 101 and 100. Moving in either direction, you can see the 4s digit and the 1s digit were both 1s for the 5 and the 4s digit for the 4, so the final number was 101.

That's the same as the integer 5, and the tool outputs it already converted. Contrast the result with the bitwise and of the same numbers which gives you 4, or the bitwise xor which gives you 1.

Other Binary Calculator

Try our other binary math calculators:



PK started DQYDJ in 2009 to research and discuss finance and investing and help answer financial questions. He's expanded DQYDJ to build visualizations, calculators, and interactive tools.

PK lives in New Hampshire with his wife, kids, and dog.

Don't Quit Your Day Job...

DQYDJ may be compensated by our partners if you make purchases through links. See our disclosures page. As an Amazon Associate we earn from qualifying purchases.
Sign Up For Emails
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram