Sorry for the clumsy title; I could not find a way to express what I am trying to do.
I get input from a user from several 32 bit integers. For example, a user may enter the following values (shown in hexadecimal format for ease of explanation):
0x00001234
0x00005678
0x0000abcd
In this particular case, the first 2 bytes of each input are constant, and the last 2 bytes are variable. To be effective I could be stored 0x0000as a single constant and create a vector of values uint16_tfor the storage of the input variable ( 0x1234, 0x5678, 0xabcd).
Now let's say that the user enters the following:
0x00000234
0x56780000
0x00001000
uint32_t, , .
:
uint32_t myVal = 0;
myVal |= input1;
myVal |= input2;
// ...
"toggled" (.. 1) myVal. .
, . ?
Update:
.
, , , ( , , , ).
, A B . 128-, B 32- .
128- 32- , . .
B, 128- , A, 128- ( ).