For this case in particular, you could create a 32bits length variable to store the whole content of the 4 nibbles inside. Some compilers provide directives which instructs compiler to assemble inline the parameters within a structure, ensuring that would not use for example 8 bit length variables to store 4 bits. In cases on which data are stored nested without gaps, you can thing about using the memcpy function.
The purpose of the bitwise or operation isn't clear. You are merging four 4-bit values into one. In the assumed special cased, the operation can be reversed, but generally it can't.
Presumed the bitwise or is what you want, it has to be actually performed during the "assignment". There's no way to simplify the syntax, except for using macros or functions.
Actually i have made it wrong.
what i want is
let suppose i have an 8bit variable, i only required its 4bits from LSB
and to access these bit's i need a structure.
for example if i need a value (0 or 1) to load on 1st bit, i write something like that A0.position1 = 1;
if i need to load a value(0 or 1) at 3rd bit , i write A0.position3 = 0;
How to do that?
or Is there anyother way to do that?
Hope i explained it properly