Sorry - I should have stuck to my comment about logical vs. bitwise ;) On 17 Apr 2014, at 18:23, David Makin wrote:
1 and 2 giving zero is bitwise and not logical....
Also you could just calculate x plus y and both are >0 if either zero bit is not set or if carry bit is set.
On 17 Apr 2014, at 17:55, Warren D Smith wrote:
On 4/17/14, James Cloos <cloos@jhcloos.com> wrote:
WDS> If x and y both are unsigned integers, and we want to tell whether WDS> (x>0 and y>0), WDS> then how can we do it?
In a language with a logical AND,
x AND y is true iff both are > 0.
--at least with C's meaning of AND, 1 AND 2 = 0, a counterexample.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
The meaning and purpose of life is to give life purpose and meaning. The instigation of violence indicates a lack of spirituality.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
The meaning and purpose of life is to give life purpose and meaning. The instigation of violence indicates a lack of spirituality.