Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWANLOGIC 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 1ANDA&B 0 0 0 1ORA|B 0 1 1 101110
101
00~B
A^BAInverter
EX-ORBit-wise Logic Operators for C