| Contents | Index |
C = bitor(A,B)
C = bitor(A,B) calculates the bit-wise OR of arguments A and B.
A,B |
Inputs, specified as one of these types:
|
C |
Result of operation, same type as inputs. |
Calculate the bit-wise OR of the integers 13 and 27. The five-bit binary representations of integers 13 and 27 are 01101 and 11011, respectively. The result is 11111, or 31.
C = bitor(uint8(13), uint8(27))
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)
MATLAB displays:
TT =
0 1
1 1Create an instance allMeetingDays using the NetDocEnum.MyDays enumeration described in Use Bit Flags with .NET Enumerations:
allMeetingDays = bitor(bitor(...
NetDocEnum.MyDays.Friday,...
NetDocEnum.MyDays.Wednesday),...
NetDocEnum.MyDays.Monday)bitand | bitcmp | bitget | bitmax | bitnot | bitset | bitshift | bitxor
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |