三值邏輯上下文中布爾和比較運算符的語義 - Semantics of the Boolean and comparison operators in the context of three-valued-logic -开发者知识库

三值邏輯上下文中布爾和比較運算符的語義 - Semantics of the Boolean and comparison operators in the context of three-valued-logic -开发者知识库,第1张

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.

3 个解决方案

#1


6  

Boolean values by definition consist of two options: True and False, or some representation of them like 1/0, ON/OFF, YES/NO, etc.

根據定義,布爾值包含兩個選項:True和False,或者它們的一些表示,如1/0,ON / OFF,YES / NO等。

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).

許多數據庫系統還允許您在指定為布爾值的字段中存儲NULL值,以允許它們表示三個值:Yes,No和Unknown(NULL)。

The Boolean Operators are AND, OR, and NOT.
Comparison Operators are some form of EQUALS or NOT EQUALS.

布爾運算符是AND,OR和NOT。比較運算符是EQUALS或NOT EQUALS的某種形式。

Operations with TRUE/FALSE values on both ends are obvious:
TRUE or FALSE -> TRUE
NOT TRUE -> FALSE
TRUE=TRUE -> TRUE

兩端的TRUE / FALSE值操作很明顯:TRUE或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) -> ???

他得到的是添加NULL(未知)值的后果:TRUE或UNKNOWN(NULL) - > ??? NOT UNKNOWN(NULL) - > ??? TRUE = UNKNOWN(NULL) - > ???

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复