Fixed: Translation Typo Error (#796)

This pull request aims at closing the issue #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 <trehleb@gmail.com>
This commit is contained in:
Kush Gabani 2022-01-22 15:18:15 +05:30 committed by GitHub
parent 457b16a5c9
commit 236379b04c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ _Read this in other languages:_
#### Get Bit
该方法向右移动目标位到最右边即位数组的第0个位置上。然后在该数上与形如 `0001`的二进制形式的数进行`ADD`操作。这会清理掉除了目标位的所有其它位的数据。如果目标位是1那么结果就是`1`,反之,结果是`0`;
该方法向右移动目标位到最右边即位数组的第0个位置上。然后在该数上与形如 `0001`的二进制形式的数进行`AND`操作。这会清理掉除了目标位的所有其它位的数据。如果目标位是1那么结果就是`1`,反之,结果是`0`;
> 查看[getBit.js](getBit.js)了解更多细节。
@ -18,7 +18,7 @@ _Read this in other languages:_
#### Clear Bit
该方法把`1`向左移动了`bitPosition`位,生成了一个二进制形如`00100`的值。然后反转每一位的数字,得到一个二进制形如`11011`的值。接着与目标值进行`ADD`操作,就能清除掉目标位的值。
该方法把`1`向左移动了`bitPosition`位,生成了一个二进制形如`00100`的值。然后反转每一位的数字,得到一个二进制形如`11011`的值。接着与目标值进行`AND`操作,就能清除掉目标位的值。
> 查看[clearBit.js](clearBit.js)了解更多细节。