Keep compilers happy

* Keep bit shifts within 32 bit boundary
- Good compiler should optimize away the multiply when platform
instructions allow
* Constants as hex instead of binary literal