3 ms·
If b is uint8_t you get zero if you <<8, but the expected value if you * by (int)256; or is it late and I should keep quiet?
by michaelg7x 8y ago
If b is uint8_t you get zero if you <<8, but the expected value if you * by (int)256; or is it late and I should keep quiet?
- 0xffff2 8y agoThe shift will automatically promote `b` to int, so the result is identical in both cases.
- michaelg7x 8y agoThanks. I'm mostly paranoid about whether the ROL instruction has precedence over the OR ... ;)