I'm not really stuck, I just don't understend one thing. I've copied the code from the example in the task.
And it says that result one's are number 2 and 8.
I can understand the logic for counting from right to left, but why it's not 2 and 4? I mean the physical place on let's say hard drive can have value either 1 or 0 and this counts as one place, then second, third and so on. Right?
Could someone please explain me the logic of counting this? I understand how to count in bitwise system but don't understand how to count digits in bitwise system.
a: 00101010 42 b: 00001111 15 =================== a & b: 00001010 10