Skip to content

A bitfield ADT, used for easily managing bits, written in C under a BSD licence.

Notifications You must be signed in to change notification settings

willemt/bitfield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How does it work?

/* allocate bitfield of 100 bits */
bitfield_t* bf = bitfield_new(100);

/* Mark 77th bit as on. */
bitfield_mark(bf, 77);

/* Mark 50th bit as off. */
bitfield_unmark(bf, 50);

/* Test if the 77th bit is marked */
if (bitfield_is_marked(bf, 77))
{
    printf("77th bit is marked\n");
}

Building

$make

About

A bitfield ADT, used for easily managing bits, written in C under a BSD licence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •