×

Close

- Discrete Structures - DS
- Note
**31 Views**- Uploaded 1 year ago

Truth table of exclusive OR : P q p q T T F T F T F T T F F F Definition 5: Conditional Statement Let p and q be any two proposition. Then the conditional statement p q is a proposition of the form if p then q. The conditional statement p is false only when p is true and q is false. It's true otherwise. * In p q, p is called hypothesis (or antecedent or premise) and q is called conclusion (or consequence). A conditional statement is also called. 'Implication'. Thus p q can be read as 'P implies q'. * p q can be expressed in any one of the following ways : if p then q p is sufficient for q q if p q is necessary for p a necessary condition for p is q q unlessp p implies q p only if q a sufficient condition for q is p q whenever p q follows from p Truth table of conditional statement: P q p q T T T T F F F T T F F T 1

Definition 6: Biconditional statement Let p and q be any two propositions. Then the biconditional statement p q is a proposition of the form 'p if and only if q'. The biconditional statement is true only when both p and q have same truth values and is false otherwise. - Biconditional statements are also called bi-implications. - p q can be expressed in a number of ways like: - p is necessary and sufficient condition for q. - if p then q and conversely - piff q Truth table of biconditionalstatement : P q pq T T T T F F F T T F F T Truth values of compound statements of compound propositions : We can make the use of logical operators (, , , , , ) to create compound proposition. The truth value of the compound proposition can be created by writing the truth values of elementary propositions involved in the com[pound proposition and applying the available logical operators in proper priority (precedence) and associativity. Ex.: Find the truth value of (p q) (p q) Solution : The truth value of the above compound proposition can be obtained by creating a truth table as below : p q q p q pq (pp)pq T T F T T T T F T T F F F T F F F F F F T T F F Precedence of logical operators Precedence defines the order of executing operators if more than one operators are present in single expression. Table below explains the precedence of logical operators : Precedence Operator 2

1. 2. 3. 4. 5. Logical and Bit Operations : Bit, abbreviated for bingary digit, is a symbol having only two possibilities of representations namely 0 (zero) and 1 (one). Due to the availability of binary choice, a bit is very important in representing truth values of logics; 0 for false and 1 for true. * Computer bit operations correspond to logical connectives by replacing true * logic by bit 1 and false logic by bit 0. Informaiton in computer system are often represented with bit string which is a sequence of 0s and 1s. Length of a string is number of bits present in it which * * * * may be 0 or more. Some of the major bitwise operations are bitwise AND, bitwise OR and bitwise XDR. Bitwise AND of two strings of same length is a bit string of same length as the original strings which is calculated by ANDing bits of original strings at respective positions. Bitwise OR of two strings of same length is a bit string of same length as that of any of the original strings which is calculated by performing OR operation on bits at respective positions of the original bit strings. Bitwise XDR of two strings of same length is a bit string of same length as that of any of the original strings which is calculated by performing XOR operation on bits at respective positions of the original bit strings. * Example : Find the bitwise AND, bitwise OR and bitwise XOR of 1010110110 and 1100011101 Solution : The original bit strings are : 1st String : 10 1011 0110 2nd String : 11 0001 1101 Bitwise AND : Bitwise OR : Bitwise XDR : 10 11 01 3 1011 1011 1010 0100 1111 1011

PROPOSITIONAL LOGIC Propositional Equivalances: Definition :Let X and Y be any two propositions (Simple or compound). Then X and Y are said to be logically equivalent propositions if they have same truth values * corresponding to each possible case of elementary propositions farming them. The truth value of a compound proposition may have variations in its truth values for different cases. A compound proposition that ahs all the truth values as 'True' irrespective of the truth values of elementary propositions froming it is called Tautology. In other words, a compound proposition that is always true is called tautology. Similarly a proposition that is always false is called Contradiction. A proposition that is neither tautology nor a contradiction is called contingency. Definition: Two compound proposition X and Y are logically equivalent if X Y is atautology. The notation X Y denotes X and y are equivalent logically. * Notable thing is that the symbol is not a logical operation and hence p q is not a compound proposition but p q is a proposition which is a tautology if p q. p q can also sometimes be represented as p q. De Morgan Laws De Morgan laws state that negation of conjunction of two propositions is logically equivalent to disjunction of their negations. Also, according to this law, the negation of disjunction of two propositions is logically equivalent to conjunction of their negations. Symbolically: (pq) p q …………….. (i) (p q) p q ……………….. (ii) Equations (i) and (ii) are called De Morgan laws which are very important in proving the logical equivalences of two compound propositions. Laws of Logical Equivalences : There are some already proven logical equivalences. These equivalences can be used as the orems. Whenever they appear in an expression they can be replaced by their equivalent propositions. Some of the proven logical equivalences are stated here. Equivalences 1. Name of Laws PTP 1. Identity laws 2. Domination laws PFP 2. PTT 4

## Leave your Comments