A description of all this %4, /4, *4, +4 calculations could shed light on this part of code.