# bitwise OR

Bitwise OR is a bit-level operation on two binary values which indicates which bits are set in either value. For each position $i$, if the bit $d_{i}$ in either value is 1, then $d_{i}$ of the result is 1, otherwise it’s 0. For example, given 50 and 163 in two unsigned bytes, a bitwise OR returns 179.

 OR = 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 1 1

In most high-level programming languages that offer bitwise OR, the usual operator is a single pipe line (—), not to be confused with a double pipe line (——) which performs a Boolean OR, returning a True or False value.

The Windows Calculator offers bitwise OR in scientific calculator mode, while the Mac OS X Calculator offers it in programmer mode.

Title bitwise OR BitwiseOR 2013-03-22 17:02:48 2013-03-22 17:02:48 PrimeFan (13766) PrimeFan (13766) 4 PrimeFan (13766) Definition msc 11A63 BitwiseAND BitwiseXOR BitwiseNOT