I see it's simple to convert golang's big int (math/big package) to a string, but is there any straightforward way of converting a big int to a binary string?
Should be as easy as this:
i := big.NewInt(2014)
s := fmt.Sprintf("%b", i) // 11111011110
fmt.Println(s)
Hope this is what you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With