mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-15 08:32:24 +08:00
Update README.
This commit is contained in:
@ -2,7 +2,11 @@
|
||||
|
||||
#### Get Bit
|
||||
|
||||
This method shifts the relevant bit to the zeroth position. Then we perform 'AND' operation with one which has bit pattern like '00001'. This clears all bits from the original number except the relevant one. If the relevant bit is one, the result is '1', otherwise the result is '0'.
|
||||
This method shifts the relevant bit to the zeroth position.
|
||||
Then we perform `AND` operation with one which has bit
|
||||
pattern like `0001`. This clears all bits from the original
|
||||
number except the relevant one. If the relevant bit is one,
|
||||
the result is `1`, otherwise the result is `0`.
|
||||
|
||||
> See `getBit` function for further details.
|
||||
|
||||
|
Reference in New Issue
Block a user