In order to use std::bitset you will have to include <bitset> header.

#include <bitset>

std::bitset overloads all of the operator functions to allow the same usage as the c-style handling of bitsets.

References

Remove rightmost set bit

Set all bits

Checking a bit

Check if an integer is a power of 2

Setting a bit

Clearing a bit

Toggling a bit

Changing the nth bit to x

Counting bits set

Bit Manipulation Application Small to Capital Letter