I need to iterate through every bit of a byte. There are many ways to do it but my curiosity got piqued when trying to use a for loop with the "shift-left" operator as the iterator. This is what I would like to do.
for (byte i = 0x01; i <= 0x80; i << 1)
{
value = value ^ i;
}
In this situation how could I use the shift-left operator (i << 1) for iteration? In a typical for loop, you would have (int i=0; i < 10; i++) the iterator being i++ for incrementing by one.