Bad: fouri = i << 2; Good: fouri = i * 4; Every compiler should be able to optimize multiplications into shifts when possible. Dennis Richie's first C compiler that fit in 4k of RAM on a PDP-7 even did this. Make the code clearer by making an explicit multiply. Same for divide. You want the code to reflect the intent.