Professional Documents
Culture Documents
I
&
Example:
In rpm
“The home team wins whenever it is raining”
" "" " " "" "
"" " ""
"
[
"
"" " "
"
:
q :
If
Converse
then it
q→p did not win
team
,
the home
is
p home team
g →
the
-
-
then
it is not raining ,
Inverse : If not win
did
.
p→ q
-
OR AND
T T F T → T T
T F T T → F F
F T F F → f- T
F F T T -3 F F
Example: Construct the truth table for the statement form (p ∨ q) ∧ ∼(p ∧ q). Note that
-
when or is used in its exclusive sense, the statement “p or q” means “p or q but not both”
s -
or “p or q and not both p and q,” which translates into symbols as (p ∨ q) ∧ ∼(p ∧ q).
This is sometimes abbreviated p ⊕ q or p XOR q.
Solution:
8 Prg (Pag)
Evan
p 7^9 -
( png)
t T T T F F
T F T F T T
F T T F T T
F F F F T F
Solution:
P 8
r
pig ir (prq)v -
T T T T F T
T T F T T T
T F T F F F
T F F F T T
F T T F F F
F T F F T T
F F T F F F
F F F F T T
T 1
F 0
A bit is a symbol with two possible values, 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. The
well-known statistician John Tukey introduced this terminology in 1946.
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 1 1 0
A bit string is a sequence of zero or more bits. The length of this string is the number of
bits in the string.
nine
Ex. 101010011 is a bit string of length __________.
• .
-
. _
Ex. Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings 0110110110
and 11 0001 1101. 0 1 01 10
I 0 1 I
Solution: 0 I 1 I 0 I
1 1 00
0 I 10 1 10
0 1 I
O 1 1 10 I
O O
I 1
↳ bitwise AND
¥7T
bitwise OR I I 1 01 10
0 1 0
::,:::i ✗ OR
↳ bitwise
1 I 0 1 I 0 I 1
I O O O I I 0 O
O I I 0 I 1 I 0
00 O O O
I I I
1 I 0 I → 1 1
10 I 1 → to 0
0 I 0 0 → 0 I
00 I 1 → 0 0