I seem to have come across an anomaly when reading the bit pattern within the elements of a byte array.
Specifically when I read the bits of the elements in the array using a “for loop”, the bit values
for the last element differ from the assigned values verified by other means. Certainly the MSB of
the last element seems to be affected by the anomaly.
When an extra element is declared in the array but not used, the readings for the bit values
(using the for loop), from the now pen-ultimate element read correctly.
Is this my bad or is there a rabbit away somewhere?
I include code showing a simple example.
Output is self explanatory.
BitAnomaly.txt (2.72 KB)