相关疑难解决方法(0)

一些运算符"|","^","&","&^"之间的差异.Golang

最近我读了golang规范并面对一些有趣的运算符:

&    bitwise AND            integers
|    bitwise OR             integers
^    bitwise XOR            integers
&^   bit clear (AND NOT)    integers
Run Code Online (Sandbox Code Playgroud)

我试过玩它,但我唯一理解的是"|" 添加整数和"+"运算符另外使用浮点数,字符串等.

它们在实践中用于什么?有人可以对上面的这4个运营商做出一些解释吗?

math operators go bitwise-operators

20
推荐指数
2
解决办法
2万
查看次数

标签 统计

bitwise-operators ×1

go ×1

math ×1

operators ×1