# Bor()

Jump to navigation
Jump to search

## Description

FUNCTION: **bor**(*number*[, *number*[, ...]])

Arguments must be an integer and are treated as a bitfield. It performs a bitwise logical OR which has the effect of forcing certain bits on in the result.

- > think bor(922,785)
- 923

In the above example, 922 in base 10 is equivalent to 39A in base 16 or 0011 1001 1010 in base 2. Likewise, 785 in base 10 is the same as 311 in base 16 and or 0011 0001 0001 in base 2.

- 0011 1001 1010 (922)
- (BOR)
- 0011 0001 0001 (785)
- --------------
- 0011 1001 1011 (923)

The result may be expressed as 39B in base 16 or 923 in base 10.

Related Topics: shl(), shr(), band(), bnand(), bxor().

(--Soylent 00:52, 3 December 2005 (EST))