You are viewing a single comment's thread. Return to all comments →
rem=n%2 checks the state of the bit in the LSB (bit 0). n=n/2 is equivalent to logical bit shift right.
This code is equivalent to the use of left/right bit-shift operators in C++!
Seems like cookies are disabled on this browser, please enable them to open this website
Day 10: Binary Numbers
You are viewing a single comment's thread. Return to all comments →
rem=n%2 checks the state of the bit in the LSB (bit 0). n=n/2 is equivalent to logical bit shift right.
This code is equivalent to the use of left/right bit-shift operators in C++!