Logic Variables and Logic Operations
Boolean algebra is used in manipulating logicvariables. A variable is either completely true orcompletely false;partly true or partly false values arenot allowed. When a variable is not true, by implica-tion it must be false.Conversely, if the variable is notfalse, it must be true. Because of this characteristic,Boolean algebra is ideally suited to variables thathave two states, or values, such as YES and NO, orfor a number system that has two values,I and 0 (i.e.the binary number system).
A variable is a quantity represented by a symbol.For example, B(the variable) could re- presentthe presence of Bob.B has two values:if Bob is present,B equals "true";if Bob is absent, B equals"false". Note that Bob is hot the variable;B is the variable that represents the presence of Bob.
A switch is ideally suited to represent the valueof any two-state variable because it can only be“off”or“on”.Consider the SPST switch in Fig.6-I.When the switch is in the closed position, it indicates that Bob is present (B=true).When it is in the open position, it then represents that Bob is absent(B=false).
It should be obvious that a closed switch couldalso represent values such as true, yes, one(I),HIGH(H), go, etc.;and the opened switch, false, no,zero(O), LOW(L), no go, etc.
There are only three basic logic operations:
(1)The conjunction (logical product) commonlycalled AND, symbolized by(.)
(2)The disjunction (logical sum) commonly:ailed OR, symbolized by(+).
(3) The negation commonly called NOT, sym-bolized by(’)or(一).
These operations are performed by logic circuits.ALL functions within a computer can be performed by-ombinations of these three basic logic operations.
翻譯:
邏輯變量及邏輯運算
布爾代數用于處理邏輯變量一個變量可以完全為真,也可以全部為假;部分真或部分假的值是允許的,當一個變量不為真時,就意味著它必須為假,相反地,如果該變量不為假,那么它必為真. 由于這個特性,布爾代數是特別理想地適合于具有兩個狀態YES(是)及NO(否)的變量中. 它也特適合于具有兩個值I和。( 二進制)的數系中。
變量是指一個由符號所代表的量,例如,B(變量)可以代表波勃(Bob)是否存在,B有兩個值;14果波勃在,則B等于“真”;如果-1勃不在,則B等于“假”,注意波剔 并不是變量;B是代表波勃是否存在 的變量。
開關是特適合于代表任何兩態變量的值的,因為它僅能處于“斷 開”(或譯為“關”)或“接通” (或譯為“開”)狀態?紤]圖6-1所示的SPST(單刀單擲)開關,當開關處于閉合位置時,它指明波勃 在(B二真),當它處于打開位置時,它則代表波勃不在(B二假)。
很明顯,一個閉合的開關還可 以代表諸如真、是、(I)、高 (H)、通過等;而一個打開的開關 可以代表假、否、(0)、低(L)、不通過等。
僅有三種基本的邏輯運算:
(1)合。ㄟ壿嫹e),通常叫做 “與”,用符號(•)表示。
(2)析。ㄟ壿嫼停,通常叫做 “或”。用符號(+)表示。
(3)反,通常叫做“非”,用符號(')或(一)表示。
這些運算是由邏輯電路執行,在計算機內部的所有功能均可由這三種基本邏輯運算的組合來實現。
文章來源于領測軟件測試網 http://www.kjueaiud.com/