package bits
import "cuelang.org/go/pkg/math/bits"
Index ¶
- func And(a, b *big.Int) *big.Int
- func Clear(a, b *big.Int) *big.Int
- func Len(x uint64) int
- func OnesCount(x uint64) int
- func Or(a, b *big.Int) *big.Int
- func Reverse(x uint64) uint64
- func ReverseBytes(x uint64) uint64
- func RotateLeft(x uint64, k int) uint64
- func Xor(a, b *big.Int) *big.Int
Functions ¶
func And ¶
And returns the bitwise and of a and b (a & b in Go).
func Clear ¶
Clear returns the bitwise and not of a and b (a &^ b in Go).
func Len ¶
Len returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func OnesCount ¶
OnesCount returns the number of one bits ("population count") in x.
func Or ¶
Or returns the bitwise or of a and b (a | b in Go).
func Reverse ¶
Reverse returns the value of x with its bits in reversed order.
func ReverseBytes ¶
ReverseBytes returns the value of x with its bytes in reversed order.
func RotateLeft ¶
RotateLeft returns the value of x rotated left by (k mod UintSize) bits. To rotate x right by k bits, call RotateLeft(x, -k).
func Xor ¶
Xor returns the bitwise xor of a and b (a ^ b in Go).
Source Files ¶
manual.go
- Version
- v0.0.4-rc1
- Published
- Jul 1, 2019
- Platform
- darwin/amd64
- Imports
- 2 packages
- Last checked
- 41 minutes ago –
Tools for package owners.