bitor - Bitwise OR
Syntax
C = bitor(A, B)
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.
C = bitor(uint8(13), uint8(27))
C =
31Example 2
Create a truth table for a logical OR operation:
A = uint8([0 1; 0 1]);
B = uint8([0 0; 1 1]);
TT = bitor(A, B)
TT =
0 1
1 1See Also
bitand, bitcmp, bitget, bitmax, bitset, bitshift, bitxor
 | bitmax | | bitset |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit