MATLAB Function Reference Previous page   Next Page
bitor

Return bitwise OR

Syntax

Description

C = bitor(A, B) returns the bitwise OR of arguments A and B, where A and B are unsigned integers or arrays of unsigned integers.

Examples

Example 1

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

Example 2

Create a truth table for a logical OR operation:

See Also

bitand, bitcmp, bitget, bitmax, bitset, bitshift, bitxor


Previous page  bitmax bitset Next page

© 1994-2005 The MathWorks, Inc.