bits.UintSize
// UintSize is the size of a uint in bits.
const UintSize = uintSize
bits.Add
// Add returns the sum with carry of x, y and carry: sum = x + y + carry.
// The carry input must be 0 or 1; otherwise the behavior is undefined.
// The carryOut output is guaranteed to be 0 or 1.
//
// This function's execution time does not depend on the inputs.
func Add(x uint, y uint, carry uint) (sum uint, carryOut uint)
bits.Add32
// Add32 returns the sum with carry of x, y and carry: sum = x + y + carry.
// The carry input must be 0 or 1; otherwise the behavior is undefined.
// The carryOut output is guaranteed to be 0 or 1.
//
// This function's execution time does not depend on the inputs.
func Add32(x uint32, y uint32, carry uint32) (sum uint32, carryOut uint32)
bits.Add64
// Add64 returns the sum with carry of x, y and carry: sum = x + y + carry.
// The carry input must be 0 or 1; otherwise the behavior is undefined.
// The carryOut output is guaranteed to be 0 or 1.
//
// This function's execution time does not depend on the inputs.
func Add64(x uint64, y uint64, carry uint64) (sum uint64, carryOut uint64)
bits.Div
// Div returns the quotient and remainder of (hi, lo) divided by y:
// quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper
// half in parameter hi and the lower half in parameter lo.
// Div panics for y == 0 (division by zero) or y <= hi (quotient overflow).
func Div(hi uint, lo uint, y uint) (quo uint, rem uint)
bits.Div32
// Div32 returns the quotient and remainder of (hi, lo) divided by y:
// quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper
// half in parameter hi and the lower half in parameter lo.
// Div32 panics for y == 0 (division by zero) or y <= hi (quotient overflow).
func Div32(hi uint32, lo uint32, y uint32) (quo uint32, rem uint32)
bits.Div64
// Div64 returns the quotient and remainder of (hi, lo) divided by y:
// quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper
// half in parameter hi and the lower half in parameter lo.
// Div64 panics for y == 0 (division by zero) or y <= hi (quotient overflow).
func Div64(hi uint64, lo uint64, y uint64) (quo uint64, rem uint64)
bits.LeadingZeros
// LeadingZeros returns the number of leading zero bits in x; the result is UintSize for x == 0.
func LeadingZeros(x uint) int
bits.LeadingZeros16
// LeadingZeros16 returns the number of leading zero bits in x; the result is 16 for x == 0.
func LeadingZeros16(x uint16) int
bits.LeadingZeros32
// LeadingZeros32 returns the number of leading zero bits in x; the result is 32 for x == 0.
func LeadingZeros32(x uint32) int
bits.LeadingZeros64
// LeadingZeros64 returns the number of leading zero bits in x; the result is 64 for x == 0.
func LeadingZeros64(x uint64) int
bits.LeadingZeros8
// LeadingZeros8 returns the number of leading zero bits in x; the result is 8 for x == 0.
func LeadingZeros8(x uint8) int
bits.Len
// Len returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func Len(x uint) int
bits.Len16
// Len16 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func Len16(x uint16) (n int)
bits.Len32
// Len32 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func Len32(x uint32) (n int)
bits.Len64
// Len64 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func Len64(x uint64) (n int)
bits.Len8
// Len8 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func Len8(x uint8) int
bits.Mul
// Mul returns the full-width product of x and y: (hi, lo) = x * y
// with the product bits' upper half returned in hi and the lower
// half returned in lo.
//
// This function's execution time does not depend on the inputs.
func Mul(x uint, y uint) (hi uint, lo uint)
bits.Mul32
// Mul32 returns the 64-bit product of x and y: (hi, lo) = x * y
// with the product bits' upper half returned in hi and the lower
// half returned in lo.
//
// This function's execution time does not depend on the inputs.
func Mul32(x uint32, y uint32) (hi uint32, lo uint32)
bits.Mul64
// Mul64 returns the 128-bit product of x and y: (hi, lo) = x * y
// with the product bits' upper half returned in hi and the lower
// half returned in lo.
//
// This function's execution time does not depend on the inputs.
func Mul64(x uint64, y uint64) (hi uint64, lo uint64)
bits.OnesCount
// OnesCount returns the number of one bits ("population count") in x.
func OnesCount(x uint) int
bits.OnesCount16
// OnesCount16 returns the number of one bits ("population count") in x.
func OnesCount16(x uint16) int
bits.OnesCount32
// OnesCount32 returns the number of one bits ("population count") in x.
func OnesCount32(x uint32) int
bits.OnesCount64
// OnesCount64 returns the number of one bits ("population count") in x.
func OnesCount64(x uint64) int
bits.OnesCount8
// OnesCount8 returns the number of one bits ("population count") in x.
func OnesCount8(x uint8) int
bits.Rem
// Rem returns the remainder of (hi, lo) divided by y. Rem panics for
// y == 0 (division by zero) but, unlike Div, it doesn't panic on a
// quotient overflow.
func Rem(hi uint, lo uint, y uint) uint
bits.Rem32
// Rem32 returns the remainder of (hi, lo) divided by y. Rem32 panics
// for y == 0 (division by zero) but, unlike Div32, it doesn't panic
// on a quotient overflow.
func Rem32(hi uint32, lo uint32, y uint32) uint32
bits.Rem64
// Rem64 returns the remainder of (hi, lo) divided by y. Rem64 panics
// for y == 0 (division by zero) but, unlike Div64, it doesn't panic
// on a quotient overflow.
func Rem64(hi uint64, lo uint64, y uint64) uint64
bits.Reverse
// Reverse returns the value of x with its bits in reversed order.
func Reverse(x uint) uint
bits.Reverse16
// Reverse16 returns the value of x with its bits in reversed order.
func Reverse16(x uint16) uint16
bits.Reverse32
// Reverse32 returns the value of x with its bits in reversed order.
func Reverse32(x uint32) uint32
bits.Reverse64
// Reverse64 returns the value of x with its bits in reversed order.
func Reverse64(x uint64) uint64