I’m trying to make a program that shifts bits that go outside the range back to 0. I encountered this problem where it just prints out the same 3 sets of bits and ignores the changes that happen after the conditions for the loop are met.
However, if I use the << operator outside the loop, it works just fine here
results for the 1st example. It seems that .set(), .test(), and other operators work perfectly fine except ‘<<‘.
tried: do and ternary
a lingis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.