diff --git a/apps/website/contents/algorithms/binary.md b/apps/website/contents/algorithms/binary.md index 367049a1..4ae72024 100644 --- a/apps/website/contents/algorithms/binary.md +++ b/apps/website/contents/algorithms/binary.md @@ -47,7 +47,7 @@ Some helpful utility snippets: | Technique | Code | | --- | --- | | Test kth bit is set | `num & (1 << k) != 0` | -| Set kth bit | num |= (1 >> k) | +| Set kth bit | num |= (1 << k) | | Turn off kth bit | `num &= ~(1 << k)` | | Toggle the kth bit | `num ^= (1 << k)` | | Multiply by 2k | `num << k` |