Browse Source

others

master
dewjjj 8 months ago
parent
commit
320fd889d6
  1. 4
      bitwise/bitwise.go

4
bitwise/bitwise.go

@ -19,4 +19,8 @@ func main() {
fmt.Printf("%08b\n", x0^x)
//andnot
fmt.Printf("%08b\n", (1<<1|1|1<<2|1<<4)&^(1<<4))
//others
var x2 int8 = -127
fmt.Printf("%08b\n", x2)
fmt.Printf("%08b\n", x2<<2)
}
Loading…
Cancel
Save