Friday 30 November 2018

CHAPTER 2 : LOGIC AND PROOF

Proposition

Example:
2+2=4
2+2=5
We’re science major
We need oxygen

Proposition 1 and 4 are T. Proposition 2 and 3 are F

Negation:

Find the negation proposition

1. I’m a mathematical major
- ~p = I’m not a mathematical major

2. Sharifah is not a student from UPSI
- ~p = Sharifah is a student from UPSI

Conjunction:
Find the conjunction proposition

1. I like to eat ice-cream and chocolate          
2. I tried to hit the nail but hit my thumb instead  

Disconjunction

Example

1. You will give me all your money or I will stab you with this table or I will stab you with this table knife
2. John is at the Library or he is studying

Exclusive Or

Example:

Would you like tea or coffee

Conditional Statement

Example:
If the moon is made a green cheese then the world end at midnight

Biconditional Statement

Example:
1. A polygon is a triangle if and only if it has exactly 3 sides

Converse, Contrapositive and Inverse

Example:
p = The sun is shinning
q = we can go to picnic

Converge : If we can go to picnic, then the sun is shinning
Contrapositive: If the is shinning, then we can go to picnic
Inverse : If we can’t go picnic, then the sun is shinning

Bit Operator

find the bitwise ^, ˅ and ⊕ of the string 101 1110 and 010 0001
^ = 111 1111
˅ = 000 0000
= 111 1111