3 ms·
The radix 2^51 trick
- erichocean 4y agoWell-written, thanks!
- tromp 4y agoThis article may give some reassurance to people worried about RISC-V not having an add with carry instruction; it's not quite as useful as it appears at first sight.
- dragontamer 4y agoI believe the general name of this trick is "carry save addition". https://en.wikipedia.org/wiki/Carry-save_adder https://en.wikipedia.org/wiki/Carry-save_adder
- nickdothutton 4y agoThe sort of operation familiar to Z80 programmers back in the day.
- bsder 4y agoI don't think that's true. ADC (add with carry) was just fine on the 8080, Z80, 6502, 6800 generation sicne memory was the same speed as CPU and everything executed in a single cycle. I mean, you even had instructions like DAA (Decimal Adjust Accumulator) which were just fine for doing BCD arithmetic. You only benefit from tricks like these when you get wide dispatch, speculative execution processors.
- 1letterunixname 4y agoThere are many such tricks in the book Hacker's Delight. It's basically an encyclopedia of tricks.