Bit shifting is expensive when it passes the 8 bit border.
Introduced new global variable to remove bitshifting.

Signed-off-by: Michel Verbraak <info@1st-setup.nl>