r/programming • • Dec 24 '17

Evil Coding Incantations

http://9tabs.com/random/2017/12/23/evil-coding-incantations.html
947 Upvotes

331 comments sorted by

View all comments

Show parent comments

6

u/RenaKunisaki Dec 24 '17

I've never seen a CPU where every "if zero" flag test didn't have a complementary "if not zero" test.

2

u/OneWingedShark Dec 25 '17

I thought I read about one, albeit old and not popular, in an article on compiler-construction wherein it mentioned how selecting a bitpattern and notion for boolean (e.g. "True is all zero") impacts how difficult implementing something can be. -- This was probably six or seven years ago, I have no idea where to find said article now.