Skip to content

Commit f2a3824

Browse files
KPham4588YuChengKai
authored and
YuChengKai
committed
right shift gets rid of leftover left zero(es)
fixed some typo and sentence structures in the guide
1 parent eadfb5a commit f2a3824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Algorithm/algorithm-en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Shift arithmetic left is to move all the binary to the left, `10` is represented
3131
10 >> 1 // -> 5
3232
```
3333

34-
The right shift of the arithmetic is to move all the binary to the right and remove the extra right. `10` is represented as `1010` in binary, and becomes `101` after shifting one bit to the right, and converted to decimal is 5, so the right shift is seen as the following formula `a >> b => a / (2 ^ b)` by basically.
34+
The bitwise right shift moves all the binary digits to the right and remove the extra left digit. `10` is represented as `1010` in binary, and becomes `101` after shifting one bit to the right, and becomes 5 in decimal value, so the right shift is basically the following formula: `a >> b => a / (2 ^ b)`.
3535

3636
Right shift is very useful, for example, you can calculate the intermediate value in the binary algorithm.
3737

@@ -863,4 +863,4 @@ In the string correlation algorithm, Trie tree can solve many problems, and has
863863
- Word frequency statistics
864864
- Prefix matching
865865

866-
If you don't know much about the Trie tree, you can go [here](../DataStruct/dataStruct-zh.md#trie) to read
866+
If you don't know much about the Trie tree, you can go [here](../DataStruct/dataStruct-zh.md#trie) to read

0 commit comments

Comments
 (0)