3 ms·
> There's some wrapping behavior of course. [...] the 1 would teleport to the right side. Not really. Shifting by definition discards 1 bits once they pass eit
by dividuum 5y ago
> There's some wrapping behavior of course. [...] the 1 would teleport to the right side.
Not really. Shifting by definition discards 1 bits once they pass either "edge" of the value. The wrapping you describe only happens with rotation operations. In the languages I know they don't have fancy short hand syntax like shifting does.