Professional Documents
Culture Documents
Key words:
logical operator, compound statement, rational test, logic gates, analog, axiomatic approach,
conjunction, disjunction, proposition, bitwise
Introduction:
We begin with a brief explanation about the logic part in discrete mathematics as well as
other subjects, outlining its use and explaining it through examples, such as the application of
it in other fields, using a software to show it etc. Conjunctions/disjunctions/biconditionals
will also be clarified by defining them before using them.
Main theory:
Logical reasoning is of great societal importance and, as stressed by the twenty-first century
skills framework, also seen as a key aspect for the development of critical thinking.
There may be times when you need to test more than one set of variables. You can combine
more than one rational test into a compound condition. For example, you want to test the case
at which a=b and c=d to print an output. To perform such operations, you will need to use the
logical operators.
In discrete mathematics, complicated sentences and formulas are put together from simpler
ones, using a small number of logical operations.
If ‘P’’ is a formula, then "not P'' is another formula, which we write symbolically as ¬P. Of
course, ¬P is false if P is true and vice versa—for example,
"6 is not a prime number'' or "It is not true that 6 is prime'' or "¬(6 is prime)¬(6 is prime)'' .
Suppose that P and Q are formulas. Then "P and Q’’' is a formula written symbolically as
P∧Q, called the conjunction of P and Q. For P∧Q to be true both P and Q must be true,
otherwise it is false—for example,
"5=6 and 7=8.'' (F)
"Seattle is in Washington and Boise is in Idaho.'' (T)
"Tolstoy was Russian and Dickens was French.'' (F)
If P and Q are formulas, then the formula "P or Q'' is written symbolically as P∨Q, called the
disjunction of P and Q. It is important to note that this is an inclusive or, that is, "either or
both''. So if P, Q or both P and Q are true, so is P∨Q. The only way P∨Q can be false is if
both P and Q are false—for example,
"Washington is in Canada or London is in England.'' (T)
"5<7 or 8<10.'' (T)
"Lenin was Spanish or Ghandi was Italian.'' (F)
If P and Q are formulas, then "if P then Q’’' or "P implies Q'' is written P⇒Q, using the
conditional symbol, ⇒. It is not obvious (at least, not to most people) under what
circumstances P⇒Q should be true. In part this is because "if… then'' is used in more than
one way in ordinary English, yet we need to fix a rule that will let us know precisely when
P⇒Q is true. Certainly, if P is true and Q is false, P cannot imply Q, so P⇒Q is false in this
case. To help us with the other cases, consider the following statement:
"If x is less than 2 then x is less than 4.''
This statement should be true regardless of the value of x (assuming that the universe of
discourse is something familiar, like the integers). If x is 1, it evaluates to T⇒, if T is 3, it
becomes F⇒T , and if x is 5, it becomes F⇒F. So P⇒Q is true unless P is true and Q is false.
A proposition is a collection of declarative statements that has either a truth value "true” or a
truth value "false". A propositional consists of propositional variables and connectives. We
denote the propositional variables by capital letters (A, B, etc). The connectives connect the
propositional variables.
Some examples of Propositions are
"Man is named Sergio", it returns truth value “TRUE”
"12 + 9 = 3 – 2", it returns truth value “FALSE”
The following is not a proposition
"A is less than 2". It is because unless we give a specific value of A, we cannot say
whether the statement is true or false.
Graphics:
A program in C will display a game called “Sudoku “ with the help of these logical operators.
The output will look like this:
Tic-Tac-Toe is another C game which is made from these operators, as well as arrays. The
output will be similar to this:
Logic gates of different appliances will also be represented using schemes on a paradigm
software:
References:
Logical operators. (n.d.). Retrieved April 26, 2022, from
https://web1.eng.famu.fsu.edu/~haik/met.dir/hcpp.dir/notes.dir/cppnotes/node42.html
Isaac Computer Science. (n.d.). Retrieved April 26, 2022, from
https://isaaccomputerscience.org/concepts/prog_concepts_logical?
examBoard=all&stage=all
Libretexts. (2022, April 17). 2.1: Statements and logical operators. Mathematics LibreTexts.
Retrieved April 26, 2022, from
https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book
%3A_Mathematical_Reasoning__Writing_and_Proof_(Sundstrom)/
02%3A_Logical_Reasoning/2.01%3A_Statements_and_Logical_Operators
Bronkhorst, H., Roorda, G., Suhre, C., & Goedhart, M. (2019, December 26). Logical
reasoning in formal and everyday reasoning tasks - International Journal of Science
and Mathematics Education. SpringerLink. Retrieved April 26, 2022, from
https://link.springer.com/article/10.1007/s10763-019-10039-8
Logical operator. Logical Operator - an overview | ScienceDirect Topics. (n.d.). Retrieved
April 26, 2022, from https://www.sciencedirect.com/topics/engineering/logical-
operator
Logical operators - javatpoint. www.javatpoint.com. Retrieved April 26, 2022, from
https://www.javatpoint.com/logical-operators