Showing posts with label Logical. Show all posts
Showing posts with label Logical. Show all posts

Logical Operators : AND Operator

This operator is also known as the logical multiplication operator and is represented by the dot (.) symbol. The AND operation is used between the variables a, b in the manner a AND b. The output in this case is 1 only when both a and b are 1. And if both are 0 or if any one of them is 0, then he output is also 0. The rules of the AND operation are:

0 . 0 = 0
0 . 1 = 0
1 . 0 = 0
1 . 1 = 1

The Truth table is shown below
Through a Venn diagram and AND operation would be shown in the figure below:

Logical Operators : OR Operator

OR is the logical addition operator and is denoted by the plus (+) symbol. Suppose there are two variables a and b; since each variable can have values of either 1 or 0 a total of four combinations of inputs are possible. An OR operation shows the output as 1 or HIGH when either of the inputs is 1 or HIGH, and also when both of the inputs are 1. So a OR b can be shown through a truth table as follows:
Here we say
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 1

Here 1 + 1 = 1. That is why the OR operator is different from the normal addition operator
The OR operation can be shown through a Venn diagram as shown in the figure below:



Logical Operators : NOT Operator

In boolean algebra any variable can have either of the two values, 0 or 1. And in terms of digital circuits it can be either of two values, LOW or HIGH. Like 0 and 1, LOW and HIGH are complements of each other. The NOT operator can be used to provide the complements of values (0,1 ; LOW, HIGH). It is a unary operator. It operates on single variable. It can be written as a bar above a variable ā or by the symbol such as a'. If a' is 1, then a= 0. Complementation or the NOT operation can be understood easily through Venn diagram.

In this diagram the circle represents a and the shaded portion of the rectangle represents ā , i.e, the complement of a.
If a=1 then ā = 0,
If a = True then ā = False.
The truth table for the NOT operator is
a            ā
0                  1
1                  0