Showing posts with label Truth Table. Show all posts
Showing posts with label Truth Table. 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:



Boolean Algebra : Truth Table

A truth table is a table in which the truth or falsity of a statement is listed for all possible proposition conditions. A truth able lists the value of the dependent variable for each set of values of the independent variables. Suppose there are three variables C, A and B, wherein the variable C is being derived from some expression based on the variables A and B.
Then, C is called the dependent variable because i is dependent on and being derived from A and B. Variables A and B are independent variables because they do not depend on any thing. So, in this example, preparing a truth table means deriving the value for dependent variable i.e. C for each set of values of independent variables (A and B).
Bu in Boolean algebra any variable can have only two values i.e. 0 and 1.
So A and B can only have values 0 and 1.
together they can have 4 possible combinations of 0 and 1 as follows.

Table 1 : Possible values of A and B
              A                B
              0                 0
              0                 1
              1                 0
              1                 1
Calculating the value for C for each possible set of values of A and B is called the Truth Table.

Table 2 : Truth able for values of A, B, and C
              A                B               C
              0                 0                0
              0                 1                0
              1                 0                0
              1                 1                1