import "math/big" func main() { // create a new integer with value 0 x := big.NewInt(0) // set the 10th bit to 1 x.SetBit(x, 10, 1) // print the binary representation of the integer fmt.Printf("%b\n", x) // prints "10000000000" }
import "math/big" func main() { // create a new integer with value 12345 x := big.NewInt(12345) // set the 2nd bit to 0 x.SetBit(x, 2, 0) // print the binary representation of the integer fmt.Printf("%b\n", x) // prints "11001" }This example creates a new `big.Int` with a value of 12345, and sets the 2nd bit to 0 using the `SetBit` method. The resulting value is then printed in binary format. Based on the functions `SetBit`, `math/big` package is likely a package for big integers arithmetic.