From 37c7be15e99c17f83f4042e36c674dca5921207b Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Sun, 12 Aug 2018 10:18:32 +0300 Subject: [PATCH] Add bit counter function. --- src/algorithms/math/bits/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/math/bits/README.md b/src/algorithms/math/bits/README.md index c8ac92b4..afffc160 100644 --- a/src/algorithms/math/bits/README.md +++ b/src/algorithms/math/bits/README.md @@ -122,10 +122,10 @@ This method counts the number of set bits in a number using bitwise operators. The main idea is that we shift the number right by one bit at a time and check the result of `&` operation that is `1` if bit is set and `0` otherwise. -`` +```text Number: 5 = 0b0101 Count of set bits = 2 -`` +``` > See `countSetBits` function for further details.