Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: