2 ms·
> it just intuitively seems like moving a bunch of bits over by 1 should be faster than dealing with xor and carries Yes, a fixed shift-by-one unit would be mu
by magicalhippo 7y ago
> it just intuitively seems like moving a bunch of bits over by 1 should be faster than dealing with xor and carries
Yes, a fixed shift-by-one unit would be much simpler than an adder. But many (most?) CPUs that supports shifting have generic shift units, where the number of bits to shift varies, and that makes them much more complex.
- kevin_thibedeau 7y agoBarrel shifters are still frequently omitted from microcontrollers. Primarily because of their size.
- magicalhippo 7y agoRight, I was thinking mostly of "application-level" CPUs capable of running Android.