@@ -8,7 +8,7 @@ pattern like `0001`. This clears all bits from the original
8
8
number except the relevant one. If the relevant bit is one,
9
9
the result is ` 1 ` , otherwise the result is ` 0 ` .
10
10
11
- > See ` getBit ` function for further details.
11
+ > See [ getBit.js ] ( getBit.js ) for further details.
12
12
13
13
#### Set Bit
14
14
@@ -17,7 +17,7 @@ value that looks like `00100`. Then we perform `OR` operation
17
17
that sets specific bit into ` 1 ` but it does not affect on
18
18
other bits of the number.
19
19
20
- > See ` setBit ` function for further details.
20
+ > See [ setBit.js ] ( setBit.js ) for further details.
21
21
22
22
#### Clear Bit
23
23
@@ -27,13 +27,13 @@ the number that looks like `11011`. Then `AND` operation is
27
27
being applied to both the number and the mask. That operation
28
28
unsets the bit.
29
29
30
- > See ` clearBit ` function for further details.
30
+ > See [ clearBit.js ] ( clearBit.js ) for further details.
31
31
32
32
#### Update Bit
33
33
34
34
This method is a combination of "Clear Bit" and "Set Bit" methods.
35
35
36
- > See ` updateBit ` function for further details.
36
+ > See [ updateBit.js ] ( updateBit.js ) for further details.
37
37
38
38
#### Multiply By Two
39
39
@@ -52,7 +52,7 @@ Number: 0b1010 = 10
52
52
Powers of two: 2^3 + 0 + 2^1 + 0
53
53
```
54
54
55
- > See ` multiplyByTwo ` function for further details.
55
+ > See [ multiplyByTwo.js ] ( multiplyByTwo.js ) for further details.
56
56
57
57
#### Divide By Two
58
58
@@ -71,7 +71,7 @@ Number: 0b0010 = 2
71
71
Powers of two: 0 + 0 + 2^1 + 0
72
72
```
73
73
74
- > See ` divideByTwo ` function for further details.
74
+ > See [ divideByTwo.js ] ( divideByTwo.js ) for further details.
75
75
76
76
#### Switch Sign
77
77
@@ -89,7 +89,7 @@ inverting all of the bits of the number and adding 1 to it.
89
89
0011 3
90
90
```
91
91
92
- > See ` switchSign ` function for further details.
92
+ > See [ switchSign.js ] ( switchSign.js ) for further details.
93
93
94
94
#### Multiply Two Numbers
95
95
@@ -114,7 +114,7 @@ x * 19 = x * 2^4 + x * 2^1 + x * 2^0
114
114
Now we need to remember that ` x * 2^4 ` is equivalent of shifting ` x ` left
115
115
by ` 4 ` bits (` x << 4 ` ).
116
116
117
- > See ` multiplyUnsigned ` function for further details.
117
+ > See [ multiplyUnsigned.js ] ( multiplyUnsigned.js ) for further details.
118
118
119
119
#### Count Set Bits
120
120
@@ -127,7 +127,7 @@ Number: 5 = 0b0101
127
127
Count of set bits = 2
128
128
```
129
129
130
- > See ` countSetBits ` function for further details.
130
+ > See [ countSetBits.js ] ( countSetBits.js ) for further details.
131
131
132
132
#### Count Bits to Flip One Number to Another
133
133
@@ -141,7 +141,7 @@ of different bits.
141
141
Count of Bits to be Flipped: 1
142
142
```
143
143
144
- > See ` bitsDiff ` function for further details.
144
+ > See [ bitsDiff.js ] ( bitsDiff.js ) for further details.
145
145
146
146
#### Count Bits of a Number
147
147
@@ -154,7 +154,7 @@ Count of valuable bits is: 3
154
154
When we shift 1 four times it will become bigger than 5.
155
155
```
156
156
157
- > See [ bitLength] ( bitLength.js ) function for further details.
157
+ > See [ bitLength.js ] ( bitLength.js ) for further details.
158
158
159
159
## References
160
160
0 commit comments