Until few days ago this question never crossed my mind. However, last week someone asked on SO a question about comparison operators on vectors in the OpenCL C language. It was quite easy to answer and everything would have stopped there if someone wouldn't have commented my answer saying that:
It's a bit annoying that scalars return 1 if the condition is true and vectors return -1.
My first thought was "who cares as long as 0 is false and all the other values are true". Then I thought that it makes more sense to return -1 when true since like that all bits are set: If false is 0000..000 then it's quite logic to have 1111...111 being true, and I though it might even be useful for some bitwise operations.
Searching a bit more about this topic, I found someone suggesting that it is even faster in certain condition to set all bits instead of the LSB (It was for another language than C and unfortunately I can't find back this post).
But then, if what I've just stated is correct why in C the value 1 was chosen? I know that the standard states so... but why?
Is it historical? Is it because some systems do not use two's complement representation? And even so, would it be a problem for these system to return -1? Actually, is there any reason at all?