This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bit variables

I want to define a 8 BIT variable and char variable that occoupy the same memory loaction in the memory.
so any change in the char variable should reflect the bit variable.
In C we can define a structure for bit
struct num
{

unsigned char X:1; unsigned char Y:1; unsigned char Z:1; unsigned char A:1; unsigned char B:1; unsigned char C:1; unsigned char D:1; unsigned char E:1;
};

struct num Axis_Move ;

How i can define a Union having one char and 8 BIT variable

0