Topic: tech dcc pc src prev next

tech dcc pc src > binary.h

#ifndef HERMES_BINARY_H
#define HERMES_BINARY_H

// Get the number of set bits in a binary integer.
char Binary_CountBits(unsigned char in);

// Get the index of the Nth set bit in a binary integer.  Returns -1 if fewer
// than N bits are set.
char Binary_SetIndex(unsigned char bin, char setbit);

#endif