Hacker News new | past | comments | ask | show | jobs | submit login

Addition of two 1-bit numbers produces a 1-bit number, which is simple and fundamental enough that we call it XOR. If you take that N-bit adder and drop the final carry (a.k.a use a couple XORs instead of the full adder), you get wrapping addition. It's a pretty natural implementation, especially for fixed width circuits where a carry flag to hold the "Nth+1" bit may not exist, like RISC-V.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: