Name
bit_ get
Synopsis
int bit_get(const unsigned char *bits
, intpos
);
Return Value
State of the desired bit: 1 or 0.
Description
Gets the state of the bit at position
pos
in the buffer
bits
. The leftmost position in the
buffer is 0. The state returned is either 1 or 0.
Complexity
O (1)
Get Mastering Algorithms with C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.