Top "Bitmask" questions

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

how to find left most 1 in a 32bit int in C

Possible Duplicate: Find the highest order bit in C How can I write a C function that will generate a …

c bitwise-operators bitmask
BitMask operation in java

Consider the scenario I have values assigned like these Amazon -1 Walmart -2 Target -4 Costco -8 Bjs -16 In …

java bitmask
How to define category bit mask enumeration for SpriteKit in Swift?

To define a category bit mask enum in Objective-C I used to type: typedef NS_OPTIONS(NSUInteger, CollisionCategory) { CollisionCategoryPlayerSpaceship = 0, CollisionCategoryEnemySpaceship = 1 &…

ios objective-c swift sprite-kit bitmask
How do I perform a circular rotation of a byte?

I'm trying to implement a function that performs a circular rotation of a byte to the left and to the …

c bitmask
create a permission bit mask in java

I want to do something like this: public enum Permissions { CanBlah1, CanBlah2, CanBlah3 } byte[] userPerm = Permissions.CanBlah1 | Permissions.CanBlah2; // check …

java bitmask
Why should I use bitwise/bitmask in PHP?

I am working on a user-role / permission system in PHP for a script. Below is a code using a bitmask …

php bit-manipulation bitmask
Bitmask: how to determine if only one bit is set

If I have a basic bitmask... cat = 0x1; dog = 0x2; chicken = 0x4; cow = 0x8; // OMD has a chicken and a …

javascript bitmask bit-masks
update specific bit in integer column

I have a mysql table where user permissions are stored as a bitmask: |user | permissions | | Admin | 31 | | User | 13 | 16 8 4 2 1 Admin -> 1 1 1 1 1 …

mysql bitmask
Can I allocate a specific number of bits in C?

I am trying to store a large amount of boolean information that is determined at run-time. I was wondering what …

c malloc bitmask
How to change background color of bitmap to transparent and background should not drag?

I used: Bitmap bitmap= Bitmap.createBitmap(255, 255, Bitmap.Config.RGB_565); Canvas canvas = new Canvas(bitmap); Background color is black.... If I …

android image-processing bitmap bitmask