逻辑变量及逻辑运算

发表于:2008-02-18来源:作者:点击数: 标签:逻辑运算
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 implic

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)合取(逻辑积),通常叫做 “与”,用符号(•)表示。    
  (2)析取(逻辑和),通常叫做 “或”。用符号(+)表示。    
  (3)反,通常叫做“非”,用符号(')或(一)表示。    
  这些运算是由逻辑电路执行,在计算机内部的所有功能均可由这三种基本逻辑运算的组合来实现。

原文转自:http://www.ltesting.net