Re: 'Unknown' and three-valued logic (was: Example where Euphoria ...)
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 24, 2002
- 458 views
> Derek, maybe you, and of course anyone else interested, would like to > have a look at the following lines, especially at the truth table? I'm > not sure if it is correct -- and I also don't know what value to use for > 'not unknown'. > > Best regards, > Juergen > > ------------------------------------------------------------------------ > > Three-Valued Logic (JuLu, 24. November 2002) > ============================================= > > Truth Table > ----------- > > Abbreviations: > T = True > F = False > U = Unknown > > > A | B | not A | A and B | A or B | A xor B > --+---+-------+---------+--------+-------- > T | T | F | T | T | F > T | F | F | F | T | T > T | U | F | U | T | U > F | T | T | F | T | T > F | F | T | F | F | F > F | U | T | F | U | U > U | T | | U | T | U > U | F | | F | U | U > U | U | | U | U | F > Looks fine to me, except that 'not U' should be 'U', paradoxically. Because if A is unknown then 'not A' means that we know what A is, however we don't. Non boolean operations will always produce an unknown value though when at least one of the operands is unknown. A | B | A + B | A - B | A * B | A = B --+---+-------+---------+--------+-------- 1 | 1 | 2 | 0 | 1 | 1 1 | U | U | U | U | U U | 1 | U | U | U | U U | U | U | U | U | U ---------------- cheers, Derek Parnell