What is the easiest way to assign an integer value to a bitmask? For example, I want an integer with the first, third and fourth bits = 1, the other = 0.
Of course I'm looking for code, not for a single value! And, of course, there are many possibilities, but I try to find the simplest and most descriptive look
source
share