Hi ,
Feeling a bit stupid asking this but could any one tell me an efficient way to modulo decrement. I know how to modulo increment for powers of two i.e -
if i want to modulo 16 increment a char i would do something like -
#define MODULO_SIZE 16
int modulo_increment(int isequence) { //increment isequence++; //map to current size isequence &= (MODULO_SIZE-1); return(isequence); }
but how do I efficiently modulo decrement
Thanks in advance
rate