BINARY LOGIC UNDERSTOOD BY COMPUTERS
HOW DO COMPUTER UNDERSTAND THE BINARY
LOGIC?
Binary logic deals with variables that
take on two discrete values and with operations that assume logical
meaning. The two values the variables
take may be called by different names (e.g. true and false, yes and no, etc.),
but for our purpose it is convenient to think in terms of bits and assign the
values of 1 and 0.
Binary logic is used to describe, in a
mathematical way, the manipulation and processing of binary information. It is particularly suited for the analysis
and design of digital systems.
For example, the digital logical circuits of many circuits that perform binary arithmetic are circuits whose behavior is most conveniently expressed by means of binary variables and logical operations. The binary logic to be introduced in this section is equivalent to an algebra called Boolean algebra.
For example, the digital logical circuits of many circuits that perform binary arithmetic are circuits whose behavior is most conveniently expressed by means of binary variables and logical operations. The binary logic to be introduced in this section is equivalent to an algebra called Boolean algebra.
Binary logic consists of binary variables
and logical operations. The variables
are designated by letters of the alphabet such as A, B, C, x, y, z, etc., with
each variable having two and only two distinct
values : 0 and 1. There are basic
logic operations: AND, OR and NOT.
·
AND:
This operation is represented by a dot or by the absence of an operator. For example, x.y = z or xy=z is read “x AND y
is equal to z”. The logical operation AND interpreted to mean and z = 1 if and only if x = 1 and y
= 1 otherwise z = 0. (Remember that x, y and z are binary variables and can be
equal to either 1 or 0 nothing else).
·
OR : This
operation is shown by addition symbol.
For example, x + y = z is read “
x OR y is equal to z” meaning that z = 1 if x=1 or y=1 or both
x=1 or if both x=1 and y = 1. If both x
= 0 , then y = 0 then z = 0.
·
NOT :
This operation is presented by a prime
(sometimes by a bar). For example , x’ =
z (or x not equal to z meaning that x is what z is not) . In other words, if x = 1, and z = 0 . But if x=0 then z = 1.
Binary logic resembles binary arithmetic
and the operations “AND” and “OR” have some similarities to multiplication and
additions, respectively. In fact, the
symbols used for AND and OR are the same as those used for multiplication and
addition.
However, binary logic should not be confused with binary arithmetic. One should realize that an arithmetic variable designates a number that may consist of many digits. A logic variable is either a one or zero. For example, in binary arithmetic we have 1 + 1 = 1 (read “one plus one equal to 2” while in binary logic we have 1 + 1 = 1 (read “ one or one equal to one”
However, binary logic should not be confused with binary arithmetic. One should realize that an arithmetic variable designates a number that may consist of many digits. A logic variable is either a one or zero. For example, in binary arithmetic we have 1 + 1 = 1 (read “one plus one equal to 2” while in binary logic we have 1 + 1 = 1 (read “ one or one equal to one”
For each combination of the values of x
and y there is a value of z specified by the definition of the logical
operation. These definations may be
listed in compact form using truth tables.
A truth table is a table of all possible combination of the variables showing the relations between the balues that the variables may take and the result of the operation. For example, the truth tables for he operations AND and OR with variables x and y are obtained by listing all possible values that the variable may have when combined in pairs. The result of the operation for each combination is when listed in a separate row. The truth tables for “AND” , “OR” and “NOT” are as under.
A truth table is a table of all possible combination of the variables showing the relations between the balues that the variables may take and the result of the operation. For example, the truth tables for he operations AND and OR with variables x and y are obtained by listing all possible values that the variable may have when combined in pairs. The result of the operation for each combination is when listed in a separate row. The truth tables for “AND” , “OR” and “NOT” are as under.
AND
X

y

x.y

0

0

0

0

1

0

1

0

0

1

1

1

OR
X

y

x +
y

0

0

0

0

1

1

1

0

1

1

1

1

NOT
X

x’

0

1

0

1

1

0

1

0

Comments
Post a Comment