Skip to content

Commit

Permalink
fix & -> ^ in algorithm-ch/en.md
Browse files Browse the repository at this point in the history
  • Loading branch information
arnold authored and YuChengKai committed Aug 14, 2018
1 parent 29dbd51 commit 2af1430
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Algorithm/algorithm-ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
```js
8 ^ 7 // -> 15
8 ^ 8 // -> 0
// 1000 & 0111 -> 1111 -> 15
// 1000 & 1000 -> 0000 -> 0
// 1000 ^ 0111 -> 1111 -> 15
// 1000 ^ 1000 -> 0000 -> 0
```

从以上代码中可以发现按位异或就是不进位加法
Expand Down
4 changes: 2 additions & 2 deletions Algorithm/algorithm-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Each bit is different, and the result is 1
```js
8 ^ 7 // -> 15
8 ^ 8 // -> 0
// 1000 & 0111 -> 1111 -> 15
// 1000 & 1000 -> 0000 -> 0
// 1000 ^ 0111 -> 1111 -> 15
// 1000 ^ 1000 -> 0000 -> 0
```

From the above code, we can find that the bitwise XOR is the not carry addition.
Expand Down

0 comments on commit 2af1430

Please sign in to comment.