Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
LOGIC HANEL
OPERATIONSBit-wise Operators in C
Logical operators
¾AND (&&), OR (||), and NOT (!)
Bit-wise operators
¾AND (&), OR (|), EX-OR (^), Inverter (~), Shift Right (>>), and Shift Left (<<)
These operators are widely used in software engineering for embedded systems and control
B 0 1 0 1
ANDA&B 0 0 0 1
ORA|B 0 1 1 1
0
1
1
1
0
1
0
1
0
0
~B
A^B
A
Inverter
EX-OR
Bit-wise Logic Operators for C