@more_magic
def double_digits_binmag16(x):
    x = (x | x << 8) & 16711935
x = (x | x << 4) & 252645135
x = (x | x << 2) & 858993459
x = (x | x << 1) & 1431655765
return x | x << 1
Doubling binary digits