We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8d4b99 commit 83ebd2bCopy full SHA for 83ebd2b
tool/binary_conversion/binary.go
@@ -6,14 +6,14 @@ func main() {
6
var switchs uint64
7
fmt.Printf("%064b\n", switchs)
8
//0000000000000000000000000000000000000000000000000000000000000000
9
- switchs = 1<<63 | 1<<62 | 1<<61 //赋值
+ switchs = 1<<63 | 1<<2 | 1<<3 //赋值
10
11
//1110000000000000000000000000000000000000000000000000000000000000
12
- switchs = 1<<63 | 0<<62 | 1<<61
+ switchs = 1<<4 | 1<<5 | 1<<6
13
14
15
//1010000000000000000000000000000000000000000000000000000000000000
16
17
- fmt.Println(1 << 62 & switchs) //判断第二位是不是0
+ fmt.Println(1 << 4 & switchs) //判断第二位是不是0
18
//0
19
}
0 commit comments