#include <BitOperation.h>
Static Public Methods | |
| unsigned int | ror (unsigned int c, int n, int bits=8) |
| Rotate a binary code right by n positions. | |
| unsigned int | rol (unsigned int c, int n, int bits=8) |
| Rotate a binary code left by n positions. | |
| int | onecount (unsigned int c, int bits=8) |
| Get the number of ones in a binary number. | |
| int | transitions (unsigned int c, int bits=8) |
| Get the number of 0-to-1 or 1-to-0 transitions in a binary number. | |
| unsigned int | rotmin (unsigned int n, int bits=8) |
| Rotate a binary number to its minimum value. | |
| int | hammingDistance (unsigned int a, unsigned int b, int bits=8) |
| Calculate the Hamming distance between two binary numbers. | |
| std::string | binary (unsigned int a, int bits=8) |
| Get a textual representation for a binary number. | |
|
||||||||||||
|
Get a textual representation for a binary number.
|
|
||||||||||||||||
|
Calculate the Hamming distance between two binary numbers.
|
|
||||||||||||
|
Get the number of ones in a binary number.
|
|
||||||||||||||||
|
Rotate a binary code left by n positions.
|
|
||||||||||||||||
|
Rotate a binary code right by n positions.
|
|
||||||||||||
|
Rotate a binary number to its minimum value.
|
|
||||||||||||
|
Get the number of 0-to-1 or 1-to-0 transitions in a binary number.
|