The document discusses propositions and logic in discrete mathematics. It provides examples of evaluating the truth values of various propositions and representing logical statements using logical operators. It also discusses bit operations such as negation, conjunction, disjunction, and their application to strings of bits. The examples are presented in a question-answer format to explain concepts related to propositions, logic, and bit operations in discrete mathematics.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
122 views41 pages
Discreet Mathematics
The document discusses propositions and logic in discrete mathematics. It provides examples of evaluating the truth values of various propositions and representing logical statements using logical operators. It also discusses bit operations such as negation, conjunction, disjunction, and their application to strings of bits. The examples are presented in a question-answer format to explain concepts related to propositions, logic, and bit operations in discrete mathematics.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 41
Discrete Mathematics
(Propositions and Logic and Bit
Operations) By Muhammad Sohaib Yousaf Proposition s• Which of the following statement is a proposition? a) Get me a glass of milkshake b) God bless you! c) What is the time now? d) The only odd prime number is 2 Proposition s• Which of the following statement is a proposition? a) Get me a glass of milkshake b) God bless you! c) What is the time now? d) The only odd prime number is 2 View Answer • Answer: d Explanation: Only this statement has got the truth value which is false Proposition s• The truth value of ‘4+3=7 or 5 is not prime’. a) False b) True Proposition s• The truth value of ‘4+3=7 or 5 is not prime’. a) False b) True View Answer • Answer: b Explanation: Compound statement with ‘or’ is true when either of the statement is true. Here the first part of the statement is true, hence the whole is true Proposition s• Which of the following option is true? a) If the Sun is a planet, elephants will fly b) 3 +2 = 8 if 5-2 = 7 c) 1 > 3 and 3 is a positive integer d) -2 > 3 or 3 is a negative integer Proposition s• Which of the following option is true? a) If the Sun is a planet, elephants will fly b) 3 +2 = 8 if 5-2 = 7 c) 1 > 3 and 3 is a positive integer d) -2 > 3 or 3 is a negative integer View Answer • Answer: a Explanation: Hypothesis is false, thus the whole statement is true Proposition s• What is the value of x after this statement, assuming the initial value of x is 5? ‘If x equals to one then x=x+2 else x=0’. a) 1 b) 3 c) 0 d) 2 Proposition s• What is the value of x after this statement, assuming the initial value of x is 5? ‘If x equals to one then x=x+2 else x=0’. a) 1 b) 3 c) 0 d) 2 View Answer • Answer: c Explanation: If condition is false so value decided according to else condition Proposition s• Let P: I am in Bangalore.; Q: I love cricket.; then q -> p(q implies p) is? a) If I love cricket then I am in Bangalore b) If I am in Bangalore then I love cricket c) I am not in Bangalore d) I love cricket Proposition s• Let P: I am in Bangalore.; Q: I love cricket.; then q -> p(q implies p) is? a) If I love cricket then I am in Bangalore b) If I am in Bangalore then I love cricket c) I am not in Bangalore d) I love cricket View Answer • Answer: a Explanation: Q is hypothesis and P is conclusion. So the compound statement will be if hypothesis then conclusion Proposition s• Let P: If Sahil bowls, Saurabh hits a century.; Q: If Raju bowls, Sahil gets out on first ball. Now if P is true and Q is false then which of the following can be true? a) Raju bowled and Sahil got out on first ball b) Raju did not bowled c) Sahil bowled and Saurabh hits a century d) Sahil bowled and Saurabh got out Proposition s• Let P: If Sahil bowls, Saurabh hits a century.; Q: If Raju bowls, Sahil gets out on first ball. Now if P is true and Q is false then which of the following can be true? a) Raju bowled and Sahil got out on first ball b) Raju did not bowled c) Sahil bowled and Saurabh hits a century d) Sahil bowled and Saurabh got out View Answer • Answer: c Explanation: Either hypothesis should be false or both (hypothesis and conclusion) should be true. Proposition s• The truth value ‘9 is prime then 3 is even’. a) False b) True Proposition s• The truth value ‘9 is prime then 3 is even’. a) False b) True View Answer • Answer: b Explanation: The first part of the statement is false, hence whole is true Proposition s• Let P: I am in Delhi.; Q: Delhi is clean.; then q ^ p(q and p) is? a) Delhi is clean and I am in Delhi b) Delhi is not clean or I am in Delhi c) I am in Delhi and Delhi is not clean d) Delhi is clean but I am in Mumbai Proposition s• Let P: I am in Delhi.; Q: Delhi is clean.; then q ^ p(q and p) is? a) Delhi is clean and I am in Delhi b) Delhi is not clean or I am in Delhi c) I am in Delhi and Delhi is not clean d) Delhi is clean but I am in Mumbai View Answer • Answer: a Explanation: Connector should be ‘and’, that is q and p Proposition s• Let P: This is a great website, Q: You should not come back here. Then ‘This is a great website and you should come back here.’ is best represented by? a) ~P V ~Q b) P ∧~Q c) P V Q d) P ∧Q Proposition s• Let P: This is a great website, Q: You should not come back here. Then ‘This is a great website and you should come back here.’ is best represented by? a) ~P V ~Q b) P ∧~Q c) P V Q d) P ∧Q View Answer • Answer: b Explanation: The second part of the statement is negated, hence negation operator is used. Proposition s• Let P: We should be honest., Q: We should be dedicated., R: We should be overconfident. Then ‘We should be honest or dedicated but not overconfident.’ is best represented by? a) ~P V ~Q V R b) P ∧~Q ∧R c) P V Q ∧R d) P V Q ∧~R Proposition s• Let P: We should be honest., Q: We should be dedicated., R: We should be overconfident. Then ‘We should be honest or dedicated but not overconfident.’ is best represented by? a) ~P V ~Q V R b) P ∧~Q ∧R c) P V Q ∧R d) P V Q ∧~R View Answer • Answer: d Explanation: The third part of the statement is negated, hence negation operator is used, for (‘or’ –V) is used and for(’but’- ∧) Logic and Bit Operations • Which of the following bits is the negation of the bits “010110”? a) 111001 b) 001001 c) 101001 d) 111111 Logic and Bit Operations • Which of the following bits is the negation of the bits “010110”? a) 111001 b) 001001 c) 101001 d) 111111 View Answer • Answer: c Explanation: Flip each of the bit to get the negation of the required string Logic and Bit Operations • Which of the following option is suitable, if A is “10110110”, B is”11100000” and C is”10100000”? a) C=A or B b) C=~A c) C=~B d) C=A and B Logic and Bit Operations • Which of the following option is suitable, if A is “10110110”, B is”11100000” and C is”10100000”? a) C=A or B b) C=~A c) C=~B d) C=A and B View Answer • Answer: d Explanation: Output of and is 1 when both other inputs are one Logic and Bit Operations • How many bits string of length 4 are possible such that they contain 2 ones and 2 zeroes? a) 4 b) 2 c) 5 d) 6 Logic and Bit Operations • How many bits string of length 4 are possible such that they contain 2 ones and 2 zeroes? a) 4 b) 2 c) 5 d) 6 View Answer • Answer: d Explanation: The strings are {0011, 0110, 1001, 1100, 1010 and 0101} Logic and Bit Operations • If a bit string contains {0, 1} only, having length 5 has no more than 2 ones in it. Then how many such bit strings are possible? a) 14 b) 12 c) 15 d) 16 Logic and Bit Operations • If a bit string contains {0, 1} only, having length 5 has no more than 2 ones in it. Then how many such bit strings are possible? a) 14 b) 12 c) 15 d) 16 View Answer • Answer: d Explanation: The total strings are 1(having no one in it) +5(having 1 one in it) +10 (having 2 ones in it) = 16 Logic and Bit Operations • If A is “001100” and B is “010101” then what is the value of A (Ex-or) B? a) 000000 b) 111111 c) 001101 d) 011001 Logic and Bit Operations • If A is “001100” and B is “010101” then what is the value of A (Ex-or) B? a) 000000 b) 111111 c) 001101 d) 011001 View Answer • Answer: d Explanation: In Ex-or if both the inputs are same then output is 0 otherwise 1 Logic and Bit Operations • The Ex-nor of this string “01010101” with “11111111” is? a) 10101010 b) 00110100 c) 01010101 d) 10101001 Logic and Bit Operations • The Ex-nor of this string “01010101” with “11111111” is? a) 10101010 b) 00110100 c) 01010101 d) 10101001 View Answer • Answer: c Explanation: In Ex-nor if both the inputs are same then output is 1 otherwise 0 Logic and Bit Operations • What is the one’s complement of this string “01010100”? a) 10101010 b) 00110101 c) 10101011 d) 10101001 Logic and Bit Operations • What is the one’s complement of this string “01010100”? a) 10101010 b) 00110101 c) 10101011 d) 10101001 View Answer • Answer: c Explanation: Negate every bit in one’s complement. Logic and Bit Operations • What is the 2’s complement of this string “01010100”? a) 10101010 b) 00110100 c) 10101100 d) 10101001 Logic and Bit Operations • What is the 2’s complement of this string “01010100”? a) 10101010 b) 00110100 c) 10101100 d) 10101001 View Answer • Answer: c Explanation: In two’s complement negate every bit from left until the first one from right is encountered Logic and Bit Operations • If in a bits string of {0,1}, of length 4, such that no two ones are together. Then the total number of such possible strings are? a) 1 b) 5 c) 7 d) 4 Logic and Bit Operations • If in a bits string of {0,1}, of length 4, such that no two ones are together. Then the total number of such possible strings are? a) 1 b) 5 c) 7 d) 4 View Answer • Answer: c Explanation: Strings can be {1001, 1010, 0101, 1000, 0100, 0010, 0001} Logic and Bit Operations • Let A: “010101”, B=?, If { A (Ex-or) B } is a resultant string of all ones then which of the following statement regarding B is correct? a) B is negation of A b) B is 101010 c) {A (and) B} is a resultant string having all zeroes d) All of the mentioned Logic and Bit Operations • Let A: “010101”, B=?, If { A (Ex-or) B } is a resultant string of all ones then which of the following statement regarding B is correct? a) B is negation of A b) B is 101010 c) {A (and) B} is a resultant string having all zeroes d) All of the mentioned View Answer • Answer: d Explanation: In Ex-or both if both the inputs are the same then output is 0 otherwise 1