3 ms·
> I also don’t find the concept of bit-shifting to be that intuitive. Can you clarify what you mean by this? Because the concept of shifting bits to the left o
by wtallis 5y ago
> I also don’t find the concept of bit-shifting to be that intuitive.
Can you clarify what you mean by this? Because the concept of shifting bits to the left or right is so simple that I don't see how it could possibly strike you as unintuitive unless you are completely unfamiliar with the idea of data being represented by a string of contiguous binary digits.
If your problem is merely that knowing what bit-shifting is does not present any obvious use cases to you, that isn't the same as finding the underlying concept unintuitive.
- dwaltrip 5y agoHmmm. I'll try. I guess the main issue is that I rarely ever deal with data in binary format. The times that I've dealt with binary strings has probably been most often as binary numbers in some sort of programming or math puzzle. Thinking of it as "multiplying" or "dividing" by a power of 2 feels more natural to me than "shifting" bits left or right. Maybe this is because I was a math major instead of CS :p If I had more experience with lower level languages and / or dealing with raw binary data formats, I probably would have internalized it better by now.