Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

Symbolic Propositions to Sentences & Conversely

Symbolic Propositions to Sentences


p: It is raining
q: It is cold
i. P ˄q
It is raining AND it is cold.
ii. P ˅q
It is raining OR it is cold.
iii. p ˄¬q
It is raining AND it is not cold.
Symbolic Propositions to Sentences
iv. q ˄¬p
p: It is raining
It is cold AND it is not raining. q: It is cold
v. q ˅p
It is cold OR it is raining.
vi. ¬p˄¬q
Neither it is raining nor it is cold (It is not raining AND it is not cold)
vii. ¬(¬p˄¬q)
It is not the case that neither it is raining nor it is cold
Symbolic Propositions to Sentences
p: Today is Friday.
q: It is raining toady But and neither – nor
Write the following sentences symbolically.
a) Today is not Friday but it is raining today.
b) Neither today is Friday nor it is raining today
Note:
“The words “BUT” & “AND” means the same thing”.
NEITHER A NOR B means as “NOT A AND B”
Symbolic Propositions to Sentences
p: Today is Friday. But and neither – nor
q: It is raining toady
Write the following sentences symbolically.
a) Today is not Friday but it is raining today. ¬p˄q
b) Neither today is Friday nor it is raining today.
Note:
“The words “BUT” & “AND” means the same thing”.
NEITHER A NOR B means as “NOT A AND B”
Symbolic Propositions to Sentences
p: Today is Friday. But and neither – nor
q: It is raining toady
Write the following sentences symbolically.
a) Today is not Friday but it is raining today. ¬p˄q
b) Neither today is Friday nor it is raining today. ¬p˄¬q
Note:
“The words “BUT” & “AND” means the same thing”.
NEITHER A NOR B means as “NOT A AND NOT B”
Notations of inequalities involving AND/OR
statement
• x ≤ a means x < a OR x=a

• a ≤ x ≤ b means a ≤ x AND x ≤ b

• a ≤ x AND x ≤ b means (a<x OR a=x) AND (x<b OR x=b)


Translating English Sentences into logical
Expressions: examples
“You can access the internet from campus if you are an ICIT student OR
you are not a visitor”
r: You can access the internet from campus.
s: you are an ICIT student.
t: you are a visitor.
¬t: you are not a visitor.
(s˅¬t) →r
Translating English Sentences into logical
Expressions: examples
“Documents can be printed only if printer is attached AND cartridge is
NOT empty”
r: Documents can be printed.
s: Printer is attached.
t: cartridge is empty.
¬t: cartridge is not empty.
(s˄ ¬t)→r
Translating English Sentences into logical
Expressions: examples
“You can change the password if and only if you are system
administrator”
P: you can change the password
q: you are system administrator

p↔q
Translating English Sentences into logical
Expressions: examples
“You can purchase this book if you have Rs.1000 or Rs.500 and a
discount coupon.”
r: You can purchase this book
s: you have Rs.1000
t: you have Rs.500
u: you have a discount coupon

s∨(t ∧ u)→r
Logic and Bit Operations
• Computers represent
information using bits. A bit is a
symbol with two possible values,
namely,0 (zero) and 1 (one). This
meaning of the word bit comes
from binary digit, because zeros
and ones are the digits used in
binary representations of
numbers
Logic and Bit Operations
• Computer bit operations
correspond to the logical
connectives. By replacing true by
a one and false by a zero in the
truth tables for the operators ∧,
∨, and ⊕. We will also use the
notation OR, AND, and XOR for
the operators ∨, ∧, and ⊕, as is
done in various programming
languages
Logic and Bit Operations
Bit string:-
“A bit string is a sequence of 0’s and 1’s. The length of this string is the number
of bits in the string.”
Example:-
101010011 (bit string of length nine)
Bitwise OR, Bitwise AND & Bitwise XoR
• Example: Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings 01 1011 0110 and
11 0001 1101. (bit strings will be split into blocks of four bits to make them easier to read)
Bitwise OR, Bitwise AND & Bitwise XoR
• Example
Evaluate the following expression 0 1011
˅1 1011
1 1000 ˄ (0 1011 ˅ 1 1011)
1 1011
Solution: ˄1 1000
1 1000
 1 1000 ˄ (0 1011 ˅ 1 1011)

 1 1000 ˄1 1011

 1 1000
Thanks

You might also like