[moderator note: two threads have been merged here - the initial posts were appended on the "101" thread and have been split off and prepended to this "Array and port problem" thread]
I want to shorten down one part of the code where I check "one cell" in the vector bit by bit. I change PortB2 depending if it is a 1 or a 0. Any suggestions?
And I dont want to use shift (<<)
if(numbers_in_bin & (1<<j)) //j goes from 0 to 7
bla bla bla
jada jada jada