Skip to content

Commit 37c7be1

Browse files
committed
Add bit counter function.
1 parent 9ce137c commit 37c7be1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/algorithms/math/bits/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ This method counts the number of set bits in a number using bitwise operators.
122122
The main idea is that we shift the number right by one bit at a time and check
123123
the result of `&` operation that is `1` if bit is set and `0` otherwise.
124124

125-
``
125+
```text
126126
Number: 5 = 0b0101
127127
Count of set bits = 2
128-
``
128+
```
129129

130130
> See `countSetBits` function for further details.
131131

0 commit comments

Comments
 (0)