Bitwise and Shift Operators
Explore Dart's bitwise and shift operators and their functions. Learn how these operators work on binary numbers and apply them in practical Dart programming examples.
We'll cover the following...
We'll cover the following...
Types of bitwise and shift operators
Bitwise operators and shift operators are operators that perform operations on individual bits of integer types. Below is a list of the bitwise operators supported by Dart.
| Operator | Name | Use |
|---|---|---|
& |
Bitwise AND | If the corresponding bit in both operands is 1 it will give a 1, else 0 |
| |
Bitwise OR | If the corresponding bit in at least one operand is 1 it will give a 1, else 0 |
^ |
Bitwise XOR | If the corresponding bit in only one operand is 1 it will give a 1, else 0 |
~ |
Unary Bitwise Complement | Bits which are |