G
Guest
I have some problems which getting bites.
For example 247 it is 11110111 in bytes.
int i = 247; // 11110111
How I can get some pozition on bite?
Something like this
i[0] = 1;
i[1] = 1;
i[2] = 1;
i[3] = 0;
i[4] = 1;
i[5] = 1;
i[6] = 1;
i[7] = 1;
So I can get 1 or 0 for any pozition.
i[2] = 1;
How I can do this?
For example 247 it is 11110111 in bytes.
int i = 247; // 11110111
How I can get some pozition on bite?
Something like this
i[0] = 1;
i[1] = 1;
i[2] = 1;
i[3] = 0;
i[4] = 1;
i[5] = 1;
i[6] = 1;
i[7] = 1;
So I can get 1 or 0 for any pozition.
i[2] = 1;
How I can do this?