Hacker News new | ask | show | jobs
by Dewie 4704 days ago
GForth uses 0 for 'false' but -1 for 'true'... that confuses me a lot.
3 comments

I expect that it's because in twos complement representation -1 is represented as all bits set.
I suppose it's because then it can just compare the first bit.
BASIC does that, too.