Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The point is OF/CF are sometimes dependent on the inputs for SUB. They never are for XOR.
 help



Ah, you mean in terms of complexity of the calculation. Thanks for clarifying.

In practice AF and CF can be computed from the carry out vector which is already available, and OF is a single XOR (of the two most significant bits of the carry out vector). The same circuitry works for XOR and SUB if the carry out vector of XOR is simply all zeroes.


It also clears any dependence on the state of those flags. Which is probably not useful in practice.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: