G
gbblob
Can someone please explain to me why left shits are equivalent to
multiplication and right shifts equivalent to devision? This seems
backwards to me.
e.g.
15 is binary 1111
if I shift this left 2 bits I get 11
however in Python 15<<2 = 60 ?!
multiplication and right shifts equivalent to devision? This seems
backwards to me.
e.g.
15 is binary 1111
if I shift this left 2 bits I get 11
however in Python 15<<2 = 60 ?!