Professor ask me this question:
What is the semantics of the Boolean and comparison operators in the context of three-valued-logic?
I'm not sure what he meant by that. What is comparison operator? Is that the same as relational operator? Semantics? He asking about 'meaning' of those two terms in context of three-valued-logic?
Thanks.
Boolean values by definition consist of two options: True and False, or some representation of them like 1/0, ON/OFF, YES/NO, etc.
Many database systems also allow you to store a NULL value in fields designated as Boolean to allow them to represent three values: Yes, No, and Unknown (NULL).
The Boolean Operators are AND, OR, and NOT.
Comparison Operators are some form of EQUALS or NOT EQUALS.
Operations with TRUE/FALSE values on both ends are obvious:
TRUE or FALSE -> TRUE
NOT TRUE -> FALSE
TRUE=TRUE -> TRUE
What he is getting at are the consequences of adding the NULL (Unknown) value:
TRUE or UNKNOWN(NULL) -> ???
NOT UNKNOWN(NULL) -> ???
TRUE=UNKNOWN(NULL) -> ???
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With