You're replying to a comment by Nathan Myers.

Nathan Myers Permalink
May 11, 2018, 05:06

A binary word is not just a number. It is also a set: for each possible element value, a 1 tells you it is present, a 0 it is not. A byte can represent days of a week, a 32-bit word is enough for a month. 0x6060c183, shifted and masked, identifies the weekend days in any month.

In C++ std::bitset<> wraps a lot of this stuff in less hacky garb.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cloud_143": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.