diff --git a/op_exp.md b/op_exp.md index dea3b8ee..c960b200 100644 --- a/op_exp.md +++ b/op_exp.md @@ -61,15 +61,15 @@ Here is a quick overview of the available operators: - `11` is represented in bits by `1011` which when right shifted by 1 bit gives `101`which is the decimal `5`. - `&` (bit-wise AND) - - Bit-wise AND of the numbers: if both bits are `1`, the result is `1`. Else it's `0`. + - Bit-wise AND of the numbers: if both bits are `1`, the result is `1`. Otherwise, it's `0`. - `5 & 3` gives `1` (`0101 & 0011` gives `0001`) - `|` (bit-wise OR) - - Bitwise OR of the numbers: if both bits are `0`, the result is `0`. Else it's `1`. + - Bitwise OR of the numbers: if both bits are `0`, the result is `0`. Otherwise, it's `1`. - `5 | 3` gives `7` (`0101 | 0011` gives `0111`) - `^` (bit-wise XOR) - - Bitwise XOR of the numbers: if both bits (`1 or 0`) are the same, the result is `0`. Else it's `1`. + - Bitwise XOR of the numbers: if both bits (`1 or 0`) are the same, the result is `0`. Otherwise, it's `1`. - `5 ^ 3` gives `6` (`O101 ^ 0011` gives `0110`) - `~` (bit-wise invert)