3 ms·
That's just wild to me. If I held up a card with a decimal number on it and asked you to remove the X least significant digits, would you have to look up which
by AnIdiotOnTheNet 5y ago
That's just wild to me. If I held up a card with a decimal number on it and asked you to remove the X least significant digits, would you have to look up which way to shift them?
- Zababa 5y agoYes, I would have to.
- dalmo3 5y agoIf you have a number base n, shift right/left k digits means, respectively, "divide/multiply by n^k". That's the same whether it's decimal (n=10) or binary (n=2).
- pcthrowaway 5y agoIt's floor division with bit shifting though, right?
- wtallis 5y agoWould you have to consult a reference in order to be able to point to the least significant digit of a number written down in front of you? Maybe the "least significant/most significant" terminology is unfamiliar enough to you to present a stumbling block. Certainly the fact that you're communicating on a written forum means you're probably comfortable and experienced reading a string of digits and knowing how to understand it as representing a quantity, even if you've forgotten the formal terminology describing that process.
- Zababa 5y agoNo, I wouldn't have to consult a reference. What's unfamiliar to me is how exactly byteshifting allows you to take the X most significant bits from a number, although now that I've talked a bit and thought a bit about this it starts to make more sense. The thing is, I've never spent much time thinking about this, so it's unfamiliar to me.