Quote:
|
Originally Posted by Astronouth7303
If you want the 2 least significant bits, wouldn't it make more sense to do:
Code:
if(someVar & 3) evenmorestufftodo;
?
|
That is what I would do, becasue the modulus operator is often slow (of course depending on the microprocessor). I haven't checked on the PIC, but if you ever want to move your code to a different platform, it's best to write for the lowest common denominator.
Sorry for bringing this thread up from the dead.