MATLAB Function Reference
  Go to function:
    Search    Help Desk 
bitor    Examples   See Also

Bit-wise OR

Syntax

Description

C = bitor(A,B) returns the bit-wise OR of two nonnegative integer arguments A and B. To ensure the operands are integers, use the ceil, fix, floor, and round functions.

Examples

The five-bit binary representations of the integers 13 and 27 are 01101 and 11011, respectively. Performing a bit-wise OR on these numbers yields 11111, or 31.

See Also

bitand      Bit-wise AND

bitcmp      Complement bits

bitget      Get bit

bitmax      Maximum floating-point integer

bitset      Set bit

bitshift    Bit-wise shift

bitxor      Bit-wise XOR



[ Previous | Help Desk | Next ]