Dart provides powerful tools for manipulating binary data at the bit level through bitwise and shift operators.
Bitwise Operators
Operator sign | Operator Name |
& | AND |
^ | XOR |
~ | Bitwise NOT |
Shift Operators
Operator sign | Operator Name | Operator Description |
<< | Left Shift | The left shift operator (<< ) shifts the bits of the left operand to the left by a specified number of positions |
>> | Right Shift | The right shift operator (>> ) shifts the bits to the right, filling vacant positions with zeros. For signed integers |
Example: