Top "Bit-fields" questions

A bit field is used to compactly store multiple logical values as a short series of bits where each of the single bits can be addressed separately.

Converting Bit Field to int

I have bit field declared this way: typedef struct morder { unsigned int targetRegister : 3; unsigned int targetMethodOfAddressing : 3; unsigned int originRegister : 3; unsigned …

c bit-fields
c - cannot take address of bit-field

Why cannot take address of bit-field? How do I make a pointer to bit-field? Here is the code... struct bitfield { …

c pointers syntax-error bit-fields memory-address
Integer to bitfield as a list

I've created a method to convert an int to a bitfield (in a list) and it works, but I'm sure …

python list bit-fields
Implementing a C style bitfield in Java

I have a problem that I am a bit stuck on and I was informed by a colleague that this …

java bit-fields bitset
Colons after variable name in C

Possible Duplicate: What does a colon in a struct declaration mean, such as :1, :7, :16, or :32? This is C code sample of …

c syntax bit-fields
Is there a bit-equivalent of sizeof() in C?

Sizeof() doesn't work when applied to bitfields: # cat p.c #include<stdio.h> int main( int argc, char **…

c sizeof bit-fields
Is it safe to use an enum in a bit field?

Say, I've got the following struct: typedef struct my_struct{ unsigned long a; unsigned long b; char* c; unsigned int …

c++ c enums bit-fields
In C, what does a colon mean inside a declaration?

Possible Duplicate: What does ‘unsigned temp:3’ means I'm learning some kernel code, and came along the following line (in linux 2.4, …

c bit-fields colon
Order of fields when using a bit field in C

I have a struct of the following type typedef struct { unsigned int a : 8; unsigned int b : 6; unsigned int c : 2; }x, *…

c gcc bit-manipulation bit bit-fields
Extension method for adding value to bit field (flags enum)

Instead of doing this to add a value to flags enum variable: MyFlags flags = MyFlags.Pepsi; flags = flags | MyFlags.Coke; …

c# .net enums flags bit-fields