Skip to content

randvoorhies/bitfield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

bitfield

A C class for convenient bit twiddling

bitfield<16> b;

b.range<0,3>() = "0101"; // Set some bits with a character string
b.range<4,7>() = 0x0f;   // Set some bits with an integer

std::cout << "bitfield: " << b.to_string() << " = " << b.to_num() << std::endl;

See test-bitfield.cpp for more examples

About

A C class for dealing with bit fields

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages