UNARY AND BINARY OPERATIONS

Published on
Embed video
Share video
Ask about this video

Scene 1 (0s)

UNARY AND BINARY OPERATIONS.

Scene 2 (7s)

In mathematical “operation” refers to calculating a value using operands and a math operator..

Scene 3 (17s)

An operand is a number, a variable that represents a number or a function that returns a number Examples: 1 2 x y.

Scene 4 (29s)

Operators determine how those values are acted upon Examples: + - / *.

Scene 5 (40s)

Unary operators. Unary operator is an operator that operates on a single operand, meaning it affects only one value or variable. Unary operators are commonly used in programming languages to perform various operations such as changing the sign of a value, incrementing or decrementing a value, or performing logical negation.

Scene 6 (59s)

Binary operations. Binary Operator is an operator that operates on two operands, meaning it affects two values or variables. Binary operators are commonly used in programming languages to perform various operations such as arithmetic operations, logical operations and bitwise operations.

Scene 7 (1m 19s)

FUNDAMENTALS OF LOGIC. 7.

Scene 8 (1m 25s)

logic. 8. Logic is the systematic study of the principles of correct reasoning. It is the science of how to evaluate arguments and identify sound thinking from flawed thinking. It involves using a set of true statements (premises) to a true conclusion..

Scene 9 (1m 40s)

1. propositions / statements. A proposition is a declarative statement that is definitively either true or false. Examples of propositions: "The Earth is round." (True) "2+2=5." (False) "Sogod, Eastern Visayas is in the Philippines." (True) Examples of what are NOT propositions: "What time is it?" (A question, not a statement) "Go clean your room." (A command, not a statement) "This sentence is false." (A paradox; it cannot be assigned a single truth value).

Scene 10 (2m 2s)

2. Logical connectives. Symbols or words that combine or modify propositions to form compound propositions. Common logical connectives: a. Negation (NOT, symbol ¬) Conjunction (AND, symbol ∧) c. Disjunction (OR, symbol ∨) d. Conditional / Implication (IF…THEN, symbol →) e. Biconditional (IF AND ONLY IF, symbol <->).

Scene 11 (2m 20s)

2. Logical connectives. 11. Negation (NOT) The negation of a proposition flips its truth value. The symbol is ¬. Example: p: "It is raining." (Assume this is true) ¬p: "It is not raining." (This is false).

Scene 12 (2m 35s)

2. Logical connectives. 12. Conjunction (AND) A conjunction is a compound statement that is true only if all of its constituent propositions are true. The symbol is ∧. Example: p: "I have a pen." (True) q: "I have a pencil." (True) p ∧ q: "I have a pen and a pencil." (This is true because both parts are true) Scenario: If you have a pen but not a pencil, the statement "I have a pen and a pencil" is false..

Scene 13 (2m 58s)

2. Logical connectives. 13. Disjunction (OR) A disjunction is a compound statement that is true if at least one of its constituent propositions is true. In logic, "or" is usually inclusive, meaning it can be one, the other, or both. The symbol is ∨. Example: p: "I will eat pizza for dinner." (True) q: "I will eat pasta for dinner." (False) p ∨ q: "I will eat pizza for dinner or I will eat pasta for dinner." (This is true because at least one part is true) Scenario: The only way for the statement to be false is if you eat neither pizza nor pasta for dinner..

Scene 14 (3m 29s)

2. Logical connectives. 14. Conditional (IF...THEN) A conditional statement, or implication, asserts that if one proposition is true, then another must also be true. The symbol is →. It is only false when the first part (the hypothesis) is true and the second part (the conclusion) is false. Example: p: "You study hard." q: "You will pass the class." p → q: "If you study hard, then you will pass the class." Scenario: The only time this promise is broken (and the statement is false) is if you do study hard (p is true) but you don't pass the class (q is false). If you don't study hard (p is false), the promise hasn't been broken, regardless of whether you pass or not..

Scene 15 (4m 3s)

2. Logical connectives. 15. Biconditional (IF AND ONLY IF, symbol <->) A biconditional statement is true when both propositions have the same truth value. It is often abbreviated as "iff". The symbol is <->. Example: p: "A polygon is a triangle." q: "A polygon has three sides." p <-> q: "A polygon is a triangle if and only if it has three sides." Scenario: This statement is true because the two propositions are always either both true or both false together. You can't have a triangle that doesn't have three sides, and you can't have a three-sided polygon that isn't a triangle..

Scene 16 (4m 53s)

3. Truth tables. A truth table is a fundamental tool in logic that displays all possible truth values for a given logical expression. It systematically lists every combination of "true" (T) and "false" (F) for the input variables and shows the resulting truth value of the entire expression. This allows you to analyze and prove the validity of logical statements..

Scene 17 (5m 11s)

3. Truth tables. How they work: For a statement with n variables, a truth table will have 2 rows to account for all possible combinations. You build the table column by column, starting with the simplest propositions and working your way up to the full expression..

Scene 18 (5m 25s)

3. Truth tables. Example Truth Table for a Conditional Statement (p→q) As you can see, the conditional statement is only false when the first part (p) is true and the second part (q) is false..

Scene 19 (5m 39s)

Tautology, Contradiction, and Contingency. These three concepts describe the outcome of a logical statement based on its truth table. Tautology A tautology is a logical statement that is always true, regardless of the truth values of its individual components. When you create a truth table for a tautology, the final column will contain only "T"s. Example: The law of the excluded middle, written as p∨¬p, is a classic tautology. The statement "A or not A" is always true..

Scene 20 (6m 5s)

Tautology, Contradiction, and Contingency. CONTRADICTION A contradiction is a logical statement that is always false, regardless of the truth values of its individual components. The final column of its truth table will contain only "F"s. It is essentially the negation of a tautology. Example: The statement p∧¬p is a contradiction. The statement "A and not A" is always false..

Scene 21 (6m 27s)

Tautology, Contradiction, and Contingency. CONTINGENCY A contingency is a logical statement that is neither always true nor always false. Its truth value depends on the circumstances of its component parts. Unlike a tautology (always true) or a contradiction (always false), a contingency's truth table will show a mix of true and false outcomes..

Scene 22 (6m 43s)

Tautology, Contradiction, and Contingency. Example: Consider the statement: "It is sunny and it is cold." p: "It is sunny." q: "It is cold." Logical expression: p∧q The truth table for this statement would be:.

Scene 23 (7m 5s)

REFERENCES. 23. [image] J. J. (2023, Septenlw 4'. In iu 2023, frem 23, frem peuelier, J. M*ium. pel leti . p. &iti pe rx:i an.

Scene 24 (7m 17s)

Thank you. Mikael C. Jovita Warrien G. Evangelista Jenn Marie M. Amago Adriane B. Lange Nikku parado.