Use std::bitset

Change-Id: Id816d1da328e83197e0b1b4641ed894b62f1c78b