SDDS ToolKit Programs and Libraries for C and Python
|
Contains binary conversion functions sbinary and bitsSet.
Definition in file binary.c.
#include "mdb.h"
Go to the source code of this file.
Functions | |
char * | sbinary (char *s, int len, long number) |
long | bitsSet (unsigned long data) |
Counts the number of set bits (1s) in the given data. | |
long bitsSet | ( | unsigned long | data | ) |
Counts the number of set bits (1s) in the given data.
This function iterates through each bit of the provided unsigned long integer and counts how many bits are set to 1.
data | The unsigned long integer to count set bits in. |
Definition at line 52 of file binary.c.
char * sbinary | ( | char * | s, |
int | len, | ||
long | number ) |
Definition at line 18 of file binary.c.