Skip to content

Commit

Permalink
update : changed else for otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
mattduerrmeier authored and swaroopch committed Jun 15, 2020
1 parent 5a3f1f1 commit 14558db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions op_exp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 14558db

Please sign in to comment.