Yes I was thinking it'll probably have a modulo in it, just not sure how to implement it in this case. Maybe to simplify it:
I have a "line" of bytes each containing 8 bits:
00000000 00000000
Each byte can only be accessed individually, and I need to find the nth bit (from the right). But I'm not sure how I can do it, especially since each byte can only be accessed by itself, otherwise just a bitshift would do the trick...