File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,15 @@ Here is a quick overview of the available operators:
61
61
- ` 11 ` is represented in bits by ` 1011 ` which when right shifted by 1 bit gives ` 101 ` which is the decimal ` 5 ` .
62
62
63
63
- ` & ` (bit-wise AND)
64
- - Bit-wise AND of the numbers: if both bits are ` 1 ` , the result is ` 1 ` . Else it's ` 0 ` .
64
+ - Bit-wise AND of the numbers: if both bits are ` 1 ` , the result is ` 1 ` . Otherwise, it's ` 0 ` .
65
65
- ` 5 & 3 ` gives ` 1 ` (` 0101 & 0011 ` gives ` 0001 ` )
66
66
67
67
- ` | ` (bit-wise OR)
68
- - Bitwise OR of the numbers: if both bits are ` 0 ` , the result is ` 0 ` . Else it's ` 1 ` .
68
+ - Bitwise OR of the numbers: if both bits are ` 0 ` , the result is ` 0 ` . Otherwise, it's ` 1 ` .
69
69
- ` 5 | 3 ` gives ` 7 ` (` 0101 | 0011 ` gives ` 0111 ` )
70
70
71
71
- ` ^ ` (bit-wise XOR)
72
- - Bitwise XOR of the numbers: if both bits (` 1 or 0 ` ) are the same, the result is ` 0 ` . Else it's ` 1 ` .
72
+ - Bitwise XOR of the numbers: if both bits (` 1 or 0 ` ) are the same, the result is ` 0 ` . Otherwise, it's ` 1 ` .
73
73
- ` 5 ^ 3 ` gives ` 6 ` (` O101 ^ 0011 ` gives ` 0110 ` )
74
74
75
75
- ` ~ ` (bit-wise invert)
You can’t perform that action at this time.
0 commit comments