bit

package
v0.0.0-...-bced520 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountBits

func CountBits(num int) []int

CountBits returns an array ans of length n + 1 such that for each i (0 <= i <= n), res[i] is the number of 1's in the binary representation of i.

func HammingWeight

func HammingWeight(num uint32) int

HammingWeight returns the hamming weight of a uint32 number.

func ReverseBits

func ReverseBits(num uint32) uint32

ReverseBits revers all bits of given number.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL