Sie sind auf Seite 1von 25

PROPOSITION

 IT IS A DECLARATIVE SENTENCE (THAT IS, A SENTENCE THAT DECLARES A


FACT) THAT IS EITHER TRUE OR FALSE, BUT NOT BOTH.
 THE BASIC BUILDING BLOCKS OF LOGIC.

EXAMPLE:
1. WASHINGTON, D.C. IS THE CAPITAL OF U.S.A.
2. TORONTO IS THE CAPITAL OF CANADA.
3. 1+1= 2
4. 2+2= 3

NOTE: Proposition 1 and 3 are true ,whereas 2 and 4 are false.


PROPOSITION
 CONSIDER THE FOLLOWING SENTENCES:

1. WHAT TIME IS IT?


2. READ THIS CAREFULLY.
3. X+1= 2
4. X+Y= Z

NOTE: Sentence 1 and 2 are not propositions because they are not
declarative sentences, while Sentence 3 and 4 are not propositions
because they are neither true or false, but it can be turned into a
proposition if we assign values to the variable.
PROPOSITION
 PROPOSITIONAL VARIABLES (Statement variables)
 Variablesthat represent propositions, just as letters are used
to denote numerical values.

 PROPOSITIONAL CALCULUS (Propositional Logic)


 an area of logic that deals with propositions . It was first
developed systematically by the Greek philosopher ARISTOTLE
more than 2300 years ago.

 COMPOUND PROPOSITIONS
 Are formed from existing propositions using logical operators.
NEGATION Proposition- the truth value of the negation of
p, ⌐p, is the opposite of the truth value of p.

NEGATION OPERATOR- constructs a new proposition from a


single existing proposition.

TABLE 1 The Truth Table for the NEGATION of a Proposition


p ⌐p

T F

F T
EXAMPLE OF NEGATION PROPOSITION
 “Michael’s PC runs Linux.”

SOLUTION: “It’s not the case that Michael’s PC runs Linux.”


“Michael’s PC does not run Linux.”

 “Vandana’s smartphone has at least 32GB of memory”

SOLUTION: “It’s not the case that Vandana’s smartphone has at least 32GB
memory.”
“Vandana’s smartphone does not have at leat 32GB of memory.”
“Vandana’s smartphone has less than 32GB of memory.”
CONJUNCTION OF TWO PROPOSITION
- is the proposition “p and q”. The conjunction p^q is true
when both p and q are true and is false otherwise.

TABLE 2 The Truth Table for the Conjunction of Two Propositions

p q p^q

T T T

T F F

F T F

F F F
EXAMPLE OF CONJUNCTION OF TWO
PROPOSITION
 “Rebeca’s PC has more than more than 16GB free hard disk space. The processor
in Rebeca’s PC runs faster than 1 GHz .”

SOLUTION: “Rebeca’s PC has more than 16GB free hard disk space, and the
processor in Rebeca’s PC runs faster than 1 GHz.”

SOLUTION: “Rebeca’s PC has more than 16GB free hard disk space, and its processor
runs faster than 1 GHz.”
DISJUNCTION OF TWO PROPOSITION
-is the proposition “p or q”. The disjunction p v q is false
when both p and q are false and is true otherwise.

TABLE 3 The Truth Table for the Disjunction of Two Propositions

p q pvq

T T T

T F T

F T T

F F F
EXAMPLE OF DISJUNCTION OF TWO
PROPOSITION
 “Students who have taken calculus or computer science can take this class.”

SOLUTION: “Students who have taken calculus or computer science, but not both ,
can enroll this class.”

 “Rebeca’s PC has more than more than 16GB free hard disk space. The processor
in Rebeca’s PC runs faster than 1 GHz .”

SOLUTION: “Rebeca’s PC has at least 16GB free hard disk space, or the processor in
Rebecca’s PC runs faster than 1 GHz.”
EXCLUSIVE OR OF TWO PROPOSITION
-the exclusive or of p and q, denoted by p q, is the proposition that is
true when exactly one of p and q is true and is false otherwise.

TABLE 4 The Truth Table for the Exclusive Or of Two Propositions

p q p q

T T F

T F T

F T T

F F F
CONDITIONAL STATEMENT
-is the proposition “if p, then q”. The conditional statement p→q is false
when p is true and q is false, and true otherwise. In the conditional statement, p
is called the hypothesis (or antecedent or premise) and q is called the conclusion
(or consequence).

TABLE 5 The Truth Table for the Conditional Statement

p q p →q

T T T

T F F

F T T

F F T
EXAMPLE OF CONDITIONAL STATEMENT
 “If I am elected. Then I will lower taxes.”

 “If you get 100% on the final, then you will get an A.”

 “Maria learns discrete mathematics. Maria will find a good job.”


SOLUTION: “If Maria learns discrete mathematics, then she will find a good job.”
“Maria will find a good job when she learns discrete mathematics.”
“For Maria to get a good job, it is sufficient for her to learn discrete
mathematics.”
“Maria will find a good job, unless she does not learn discrete
mathematics.”
BICONDITIONAL STATEMENT
-is the proposition “p if only if q”. The biconditional statement
p ↔ q is true when p and q have the same truth values, and is false otherwise.
Biconditional statements are also called bi-impilications.

TABLE 6 The Truth Table for the Biconditional Statement

p q p ↔q

T T T

T F F

F T F

F F T
LOGIC AND BIT OPERATIONS
 Computers represent information using bits.
 BITS-is a symbol with two possible values, namely, 0 (zero) and 1
(one).
 A bit can be used to represent a truth value , because there are two
truth values, namely true and false. We will use a 1 bit to represent
true and a 0 bit to represent false.
 COMPUTER BIT OPERATIONS correspond to the logical connectives.

Truth Value Bit

T 1

F 0
LOGIC GATES
 A logic gate is an elementary building block of a digital circuit. Most logic
gates have two inputs and one output. At any given moment, every terminal
is in one of the two binary conditions low (0) or high (1), represented by
different voltage levels.

 Digital systems are said to be constructed by using logic gates. These gates
are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic
operations are described below with the aid of truth tables.
Table 1: Logic Gate Symbols
AND Gate
- The AND gate is an electronic circuit that gives a high output (1) only if all its
inputs are high. A dot (.) is used to show the AND operation i.e. A.B. Bear in
mind that this dot is sometimes omitted i.e. AB
OR Gate
- The OR gate is an electronic circuit that gives a high output (1) if
one or more of its inputs are high. A plus (+) is used to show the OR
operation.
NOT Gate
- The NOT gate is an electronic circuit that produces an inverted version of the input at
its output. It is also known as an inverter. If the input variable is A, the inverted output is
known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the
outputs. The diagrams below show two ways that the NAND logic gate can be configured to
produce a NOT gate. It can also be done using NOR logic gates in the same way.
NAND Gate
- a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The
outputs of all NAND gates are high if any of the inputs are low. The symbol is an
AND gate with a small circle on the output. The small circle represents
inversion.
NOR Gate
- This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The
outputs of all NOR gates are low if any of the inputs are high. The symbol is an OR
gate with a small circle on the output. The small circle represents inversion.
EXOR Gate
- The 'Exclusive-OR' gate is a circuit which will give a high output if either, but
not both, of its two inputs are high. An encircled plus sign ( ) is used to show
the EOR operation.
EXNOR Gate
- The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give
a low output if either, but not both, of its two inputs are high. The symbol is an
EXOR gate with a small circle on the output. The small circle represents
inversion.
Table 2 is a summary truth table of the input/output combinations for the NOT gate
together with all possible input/output combinations for the other gate functions.
Also note that a truth table with 'n' inputs has 2n rows. You can compare the outputs
of different gates.

 Table 2: Logic gates representation using the Truth table

Das könnte Ihnen auch gefallen