OSDN Git Service

Update docs/ds/fenwick.md
authorLin Weijun <37108698+Joke-Lin@users.noreply.github.com>
Wed, 13 May 2020 09:04:40 +0000 (17:04 +0800)
committerGitHub <noreply@github.com>
Wed, 13 May 2020 09:04:40 +0000 (17:04 +0800)
Co-authored-by: mgt <mgt@oi-wiki.org>
docs/ds/fenwick.md

index 98ef081..e33f712 100644 (file)
@@ -59,7 +59,7 @@ int lowbit(int x) {
 
  **你可能又问了:x & -x 是什么意思啊?** 
 
->  $-x$ 代表 $x$ 的负数,计算机中负数使用对应的正数的补码来表示。
+>  $-x$ 是 $x$ 的相反数,计算机用补码来表示负数。$-x$ 的二进制表示等价于将 $x$ 的二进制表示取反再加一,即 `-x == ~x + 1`
 
 例如 :  
  $x =88_{(10)}=01011000_{(2)}$ ;