CLASS-11 SUBJECT – COMPUTER CHAPTER 2- PROPOSITIONAL LOGIC & HARDWARE(PART2)

TRUTH TABLE EXAMPLES

Example 1:

Is ~(p∧q) equivalent to ~p∨~q?

To test this statement, we must make a for ~(p∧q) and a truth table for ~p∨~q and then compare the truth values in each table( Here T=1 and F=0):

p q p∧q ~(p∧q) T T T F T F F T F T F T F F F T

p q ~p ~q ~p∨~q T T F F F T F F T T F T T F T F F T T T

In the two truth tables I've created above, you can see that I've listed all the truth values of p and q in the same order. This is so that I can compare the values in the final column in the two truth tables without worrying about whether or not I am matching up the right rows - because the rows are already in the same order, I can just compare the final column of one table with the final column of the other like this:

p q ~(p∧q) ~p∨~q T T F F T F T T F T T T F F T T In this case, the truth values for ~(p∧q) and ~p∨~q are exactly the same, so we can conclude that the two statements are equivalent:

~(p∧q)=~p∨~q

Example 2:

Show that and are logically equivalent.

Since the columns for and are identical, the two statements are logically equivalent.

Example 3:

Show that is a .

I construct the truth table for and show that the formula is always true.

The last column contains only T's. Therefore, the formula is a tautology.

Example 4:

Show that the statement p ∧∼p is a .

Solution:

p ∼p p ∧∼p

T F F

F T F

Since, the last column contains all F's, so it's a contradiction.

Example 5:

Show that the statement (p →q)⟶ (p∧q ) is a contingency.

p q p →q p∧q (p →q)⟶ (p∧q )

T T T T T

T F F F T

F T T F F

F F T F F

Logic gates

Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, XOR and XNOR gates. The basic operations are described below with the aid of truth tables.

AND gate

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A dot (.) is used to show the AND operation i.e. A.B.

OR gate

The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high. A plus (+) is used to show the OR operation.

NOT gate

The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It is also known as an . If the input variable is A, the inverted output is known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the outputs.

NAND gate

This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on the output. The small circle represents inversion.

NOR gate

This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all NOR gates are low if any of the inputs are high. The symbol is an OR gate with a small circle on the output. The small circle represents inversion.

XOR gate

The 'Exclusive-OR' gate is a circuit which will give a high output for only those input combinations that have odd number of 1’s. An encircled plus sign ( ) is used to show the XOR operation.

XNOR gate

The 'Exclusive-NOR' gate circuit does the opposite to the XOR gate. It will give a high output when the input combination has even number of 1’s. The symbol is an XOR gate with a small circle on the output. The small circle represents inversion.

NOTE- All the answers should be given in your notebook

Q1- Explain the above given examples of Tautology, Contradiction and Contingency with truth tables. Q2- Exlaisn AND, OR, NOT gates. Q3- Exlaisn NAND, NOR gates. Q4- Exlaisn XOR, XNOR gates.

------