Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn.
-
Upload
darrell-ball -
Category
Documents
-
view
217 -
download
0
Transcript of Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn.
www.company.com
Module Code MA1032N:Logic
Lecture for Week 5
2011-2012 Autumn
www.company.com
AgendaWeek 5 Lecture coverage:
– Set and Venn diagram
– Number Bases
www.company.com
Venn Diagrams
• Venn diagrams were conceived by English
mathematician John Venn (1834- 1923).
• When considering the subsets of a given universal set
a diagrammatic representation is often helpful.
• In a Venn diagram, the universal set is represented by
points in the interior of a rectangle and non-empty
subsets by the interior of closed curves, usually circles.
www.company.com
Venn Diagrams (Cont.)
• For Example:• For sets with a small number of elements, the
individual elements might be included in the diagram.
www.company.com
Venn Diagrams (Cont.)
www.company.com
Venn Diagrams (Cont.)
www.company.com
Venn Diagrams (Cont.)
www.company.com
Venn Diagrams (Cont.)
www.company.com
Venn Diagrams (Cont.)
www.company.com
A B
A
B C
EXERCISE
Shade the followinga. A Bb. A Bc. (B A)d. A’ B’e. A’ B’f. (A’ B) Cg. (A C) Bh. (A’ C’) Bi. (A’ B’) C’j. (A’ B’) C’k. (A C)’ C
www.company.com
Brackets in Set Expressions(Cont.)
Note
When there are brackets in an expression, we must respect them. In particular:
1.We should never write anything like as this is not well-defined. A ∩ B C. ∪
The result will depend on the order in which we perform the operations. We
must use brackets to indicate this order.
2.In any expression involving sets we must have at least one bracket between
each ∩ and .∪
3.In a similar way, we have to worry about brackets with the complement
operator.
www.company.com
Brackets in Set Expressions(Cont.)
Suppose that Ω=x: x Z, 0<x<10, ∈ A=1,2,5,7,9 and B=2,3,5,7,9
Calculate:
www.company.com
Brackets in Set Expressions(Cont.)
Which is also supported by Venn Diagram
www.company.com
The Laws of Set Algebra
The Basic Five Laws:
For any subsets A,B,C of the universal Set Ω, we have
www.company.com
The Laws of Set Algebra (Cont.)
www.company.com
The Laws of Set Algebra (Cont.)
www.company.com
The Laws of Set Algebra (Cont.)
www.company.com
The Principal of Duality
To every theorem of set theory there
corresponds a dual obtained from it by replacing
www.company.com
The Principal of Duality (Cont.)
We have seen that in above example:
www.company.com
Other Laws
1. There are many other laws of set algebra that are
useful in simplifying complicated set expressions.
2. They can all be proved from the five basic laws.
3. The most important of these are stated and proved
below.
www.company.com
Other Laws (Cont.)
www.company.com
Other Laws (Cont.)
www.company.com
Other Laws (Cont.)
www.company.com
Other Laws (Cont.)
1. The proofs of (10) and (11) are slightly more difficult.
2. We have seen that if A is any subset of Ω, its
complement
3. We now show that if X is any set which satisfies both
www.company.com
Other Laws (Cont.)
www.company.com
Other Laws (Cont.)
Now, we can use theorem 1 to prove laws (10) and (11)
www.company.com
Other Laws (Cont.)
www.company.com
Other Laws (Cont.)
www.company.com
Number Bases
www.company.com
30
Objective
In this lesson you’ll learn about different Number Bases, specifically about those used by the computer
• Those include:– Base Two – binary– Base Eight – octal– Base Sixteen – hexadecimal– Base Ten – Decimal
www.company.com
Number systems• Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9• Binary – 0, 1• Octal – 0, 1, 2, 3, 4, 5, 6, 7• Hexadecimal system – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
A, B, C, D, E, F
www.company.com
Base Conversion• In daily life, we use decimal (base 10) number
system• Computer can only read in 0 and 1
– Number system being used inside a computer is binary (base 2)
– Octal (base 8) and hexadecimal (base 16) are used in programming for convenience
www.company.com
Conversions between Bases • Decimal to other bases • Other bases to decimal • Binary to octal• Binary to hexadecimal• Octal to binary • Hexadecimal to Binary • Octal to hexadecimal • Hexadecimal to octal
www.company.com
Exercises.. Convert the following:
a. 157 denary to binary
b. 1100110101 binary to octal
c. ACD hexadecimal to denary
d. 2464 octal to hexadecimal
Convert the following:
a. 101 101 101 Binary to Octal
b. DAB Hexadecimal to Denary
c. 2839 Denary to Hexadecimal
d. 7453 Octal to Hexadecimal
www.company.com
Exercises …Add the followings numbers by using binary
addition .
a. 234 octal + 102 octal (give your answer in hex)
b. BAE hex + 127 hex (give your answer in octal)
c. 2047 octal + 1002 octal (give your answer in decimal )
www.company.com
The End