Kev ua haujlwm AND yog dab tsi?
Kev ua haujlwm AND yog dab tsi?

Video: Kev ua haujlwm AND yog dab tsi?

Video: Kev ua haujlwm AND yog dab tsi?
Video: Lus Qhuab Qhia | "Txoj Kev Yug Los Ua Neeg Yog Dab Tsi?" 2024, Tej zaum
Anonim

THIAB tus neeg ua haujlwm yog Boolean tus neeg ua haujlwm siv los ua ib qho kev sib txuas lus ntawm ob kab lus --Expression 1 Thiab Experession 2. THIAB tus neeg ua haujlwm rov qab tus nqi ntawm TRUE yog tias ob qho tib si nws cov operands yog TRUE, thiab FALSEotherwise.

Hauv qhov no, kev ua haujlwm logic yog dab tsi?

Kev ua haujlwm logic suav nrog ib qho kev ua haujlwm uas manipulate Boolean qhov tseem ceeb. Boolean qhov tseem ceeb yog qhov tseeb lossis cuav. Lawv muaj npe tom qab English mathematician George Boole, whoinvented Boolean algebra, thiab yog dav suav hais tias yog tus tsim ntawm computer science theory. Lawv kuj tuaj yeem sawv cev ua 1 thiab 0.

Qhov thib ob, dab tsi tsis yog kev ua haujlwm? Hauv Boolean algebra, lub TSIS tus neeg ua haujlwm yog Boolean tus neeg ua haujlwm uas rov TRUE lossis 1 thaum tus operand yog FALSE lossis 0, thiab xa rov FALSE lossis 0 thaum tus operand yog TRUE lossis 1. Qhov tseem ceeb, qhov tus neeg ua haujlwm thim rov qab cov ntsiab lus muaj txiaj ntsig nrog rau qhov kev qhia uas nws ua haujlwm.

Ua kom pom qhov no, XOR yog dab tsi?

XOR yog binary kev ua haujlwm , nws stands rau "tshwj xeeb los yog", uas yog hais tias qhov tshwm sim me ntsis ntsuas rau oneif tsuas yog raws nraim ib qho ntawm cov khoom raug teeb tsa. Qhov no yog nws muaj nuj nqi rooj: a | b | a^b --|---|------ 0 | 0 | 0 0 | 1 | 11 | 0 | 11 | 1 | 0. Qhov no kev ua haujlwm yog ua los ntawm txhua ob qhov sib thooj ntawm tus lej

Dab tsi yog 3 tus neeg ua haujlwm logical?

Logical operators . Muaj peb logicaloperators hauv JavaScript: || (OR), && (AND), ! (TSIS) Txawm hais tias lawv hu ua " logical ”, lawv tuaj yeem siv rau qhov tseem ceeb ntawm txhua hom, tsis yog xwb boolean.

Pom zoo: