I think you are confused between arrays and numbers, in particular, what it means to manipulate binary numbers.
. , , . 1,2,3,4... , , , , ?
1, 2, 4, 8, 16... , . ? , 2, 00000000, 2, . 1, 4 8. , 00001101. , = 1 * 2 ^ 0, 1 * 2 ^ 2 1 * 2 ^ 3. 13.
, , . , , 8, 8 = 00001000. , , , :
00001101
& 00001000
= 00001000
, , - , 1, 1, 0.
, C:
int func(...)
{
int retval = 0;
if ( sometestthatmeans an error )
{
retval += 1;
}
if ( sometestthatmeans an error )
{
retval += 2;
}
return retval
}
int anotherfunc(...)
{
uint8_t x = func(...)
if ( ( ( x & 0x08 ) >> 3 ) == 1 )
{
}
}
, . , xml .., , . (, 2) , , .
, . , ( ). , ... .