Quantcast
Channel: C++ Do operation on bits of a std::bitset - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Bo Persson for C++ Do operation on bits of a std::bitset

$
0
0

There is no shortcut with slicing bitsets. Just work your way through the bits

a[0] = arr[0] & arr[4] & arr[8] & arr[12];

etc.

It can't take the computer long to check 16 bits, however you do it!


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>