www.company.com module code ma1032n: logic lecture for week 5 2011-2012 autumn
TRANSCRIPT
![Page 1: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/1.jpg)
www.company.com
Module Code MA1032N:Logic
Lecture for Week 5
2011-2012 Autumn
![Page 2: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/2.jpg)
www.company.com
AgendaWeek 5 Lecture coverage:
– Set and Venn diagram
– Number Bases
![Page 3: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/3.jpg)
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.
![Page 4: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/4.jpg)
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.
![Page 5: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/5.jpg)
www.company.com
Venn Diagrams (Cont.)
![Page 6: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/6.jpg)
www.company.com
Venn Diagrams (Cont.)
![Page 7: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/7.jpg)
www.company.com
Venn Diagrams (Cont.)
![Page 8: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/8.jpg)
www.company.com
Venn Diagrams (Cont.)
![Page 9: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/9.jpg)
www.company.com
Venn Diagrams (Cont.)
![Page 10: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/10.jpg)
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
![Page 11: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/11.jpg)
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.
![Page 12: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/12.jpg)
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:
![Page 13: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/13.jpg)
www.company.com
Brackets in Set Expressions(Cont.)
Which is also supported by Venn Diagram
![Page 14: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/14.jpg)
www.company.com
The Laws of Set Algebra
The Basic Five Laws:
For any subsets A,B,C of the universal Set Ω, we have
![Page 15: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/15.jpg)
www.company.com
The Laws of Set Algebra (Cont.)
![Page 16: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/16.jpg)
www.company.com
The Laws of Set Algebra (Cont.)
![Page 17: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/17.jpg)
www.company.com
The Laws of Set Algebra (Cont.)
![Page 18: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/18.jpg)
www.company.com
The Principal of Duality
To every theorem of set theory there
corresponds a dual obtained from it by replacing
![Page 19: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/19.jpg)
www.company.com
The Principal of Duality (Cont.)
We have seen that in above example:
![Page 20: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/20.jpg)
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.
![Page 21: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/21.jpg)
www.company.com
Other Laws (Cont.)
![Page 22: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/22.jpg)
www.company.com
Other Laws (Cont.)
![Page 23: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/23.jpg)
www.company.com
Other Laws (Cont.)
![Page 24: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/24.jpg)
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
![Page 25: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/25.jpg)
www.company.com
Other Laws (Cont.)
![Page 26: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/26.jpg)
www.company.com
Other Laws (Cont.)
Now, we can use theorem 1 to prove laws (10) and (11)
![Page 27: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/27.jpg)
www.company.com
Other Laws (Cont.)
![Page 28: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/28.jpg)
www.company.com
Other Laws (Cont.)
![Page 29: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/29.jpg)
www.company.com
Number Bases
![Page 30: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/30.jpg)
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
![Page 31: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/31.jpg)
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
![Page 32: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/32.jpg)
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
![Page 33: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/33.jpg)
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
![Page 34: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/34.jpg)
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
![Page 35: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/35.jpg)
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 )
![Page 36: Www.company.com Module Code MA1032N: Logic Lecture for Week 5 2011-2012 Autumn](https://reader036.vdocuments.site/reader036/viewer/2022081519/56649ef15503460f94c029fa/html5/thumbnails/36.jpg)
www.company.com
The End