Top "Bitmask" questions

Bitmask is a technique used to isolate specific bits in a byte in order to work only on the desired ones.

What is Bit Masking?

I am fairly new to C programming, and I encountered bit masking. Can someone explain to me the general concept …

c bit-manipulation bitwise-operators terminology bitmask
How to use bitmask?

How do i use it in C++ ? when is it useful to use ? Please give me an example of a …

c++ c++11 bitmask
Using a bitmask in C#

Let's say I have the following int susan = 2; //0010 int bob = 4; //0100 int karen = 8; //1000 and I pass 10 (8 + 2) as a parameter to a …

c# bitmask
What is a bitmask and a mask?

On the PHP documentation about JSON it mentions the word bitmask. Wikipedia has it defined as a mask. I don't …

bitmask
Combining Enum Value using Bitmask

I understand it's possible to use bitmasks in enum values, but I don't know how to create it. I have …

c++ c enums bitmask
Getting upper and lower byte of an integer in C# and putting it as a char array to send to a com port, how?

In C I would do this int number = 3510; char upper = number >> 8; char lower = number && 8; SendByte(upper); …

c# char bytearray bit-shift bitmask
What to do when bit mask (flags) enum gets too large

I have a very large set of permissions in my application that I represent with a Flags enumeration. It is …

c# permissions enums types bitmask
How do you set only certain bits of a byte in C without affecting the rest?

Say I have a byte like this 1010XXXX where the X values could be anything. I want to set the …

c byte bitmask
How to create mask with least significat bits set to 1 in C

Can someone please explain this function to me? A mask with the least significant n bits set to 1. Ex: n = 6 …

c bit-manipulation bitmask
How do I check, if bitmask contains bit?

I don't quite understand this whole bitmask concept. Let's say I have a mask: var bitMask = 8 | 524288; I undestand that this …

c# bit-manipulation bitmask