我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

“&^”运算符是什么意思?

I am a newbie of golang, and confused with the "&^" operator.

From the spec, the explanation of "&^" is: bit clear (AND NOT). Per my understanding, it means: x &^ y == x & (^y).

Is my understanding right? Thanks!

Your'understanding is right. You can make it as a "bit operator" And the rules:

1 &^ 1 = 0
1 &^ 0 = 1
0 &^ 0 = 0
0 &^ 1 = 0

Just like x & y, x ^ y, x | y.

近期文章

  • 嵌入golang是否违反Demeter法则?
  • 安装Go依赖项失败
  • 如何使用接口中的方法修改struct中的字段?
  • Golang Slice中的内存泄漏
  • Golang:使用C库无法使gdb用于Go程序
  • 如何在Linux上编译跨平台的Go语言项目?
  • http.Handle(“ /”,websocket.Handler(EchoServer)EchoServer可以获取ws以外的其他参数吗?
  • 如何在Golang中将字符串转换为* uint64?
  • Go中成语的切片拼接吗?
  • tour.golang.org#36 pic.Show实现的功能
  • 在初始化期间建立的Go常数
  • Golang`select`似乎不公平[重复]
  • 如何从Go中的字符串按路径导入包?
  • 在Go中创建单向频道有什么意义
  • Golang中没有这样的文件或目录错误
  • Golang:在字符串的类型别名上使用string.join
  • JITed LLVM代码如何回调Go函数?
  • Golang加密多次呼叫有不同的响应
  • 手动读取JSON值
  • 如何检查[] byte是否为全零

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华