Skip to content

Commit 236379b

Browse files
KushGabanitrekhleb
andauthoredJan 22, 2022
Fixed: Translation Typo Error (trekhleb#796)
This pull request aims at closing the issue trekhleb#765 by fixing the typo in the translation. Specifically, Get Bit and Clear Bit, there should be AND operation (&), but not ADD operation (+) Co-authored-by: Oleksii Trekhleb <[email protected]>
1 parent 457b16a commit 236379b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/algorithms/math/bits/README.zh-CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _Read this in other languages:_
66

77
#### Get Bit
88

9-
该方法向右移动目标位到最右边,即位数组的第0个位置上。然后在该数上与形如 `0001`的二进制形式的数进行`ADD`操作。这会清理掉除了目标位的所有其它位的数据。如果目标位是1,那么结果就是`1`,反之,结果是`0`;
9+
该方法向右移动目标位到最右边,即位数组的第0个位置上。然后在该数上与形如 `0001`的二进制形式的数进行`AND`操作。这会清理掉除了目标位的所有其它位的数据。如果目标位是1,那么结果就是`1`,反之,结果是`0`;
1010

1111
> 查看[getBit.js](getBit.js)了解更多细节。
1212
@@ -18,7 +18,7 @@ _Read this in other languages:_
1818
1919
#### Clear Bit
2020

21-
该方法把`1`向左移动了`bitPosition`位,生成了一个二进制形如`00100`的值。然后反转每一位的数字,得到一个二进制形如`11011`的值。接着与目标值进行`ADD`操作,就能清除掉目标位的值。
21+
该方法把`1`向左移动了`bitPosition`位,生成了一个二进制形如`00100`的值。然后反转每一位的数字,得到一个二进制形如`11011`的值。接着与目标值进行`AND`操作,就能清除掉目标位的值。
2222

2323
> 查看[clearBit.js](clearBit.js)了解更多细节。
2424

0 commit comments

Comments
 (0)
Please sign in to comment.