Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 2: Abilities of Computers.

Similar presentations


Presentation on theme: "CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 2: Abilities of Computers."— Presentation transcript:

1 CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 2: Abilities of Computers

2 Module 2CMPF144 Fundamentals of Computing TheorySlide 2 Objectives Present an overview of the abilities of computers. Present an overview on the intelligence of computers Present the concepts of Boolean approach and their impact on computer abilities Present the concepts of yes /no tree

3 Module 2CMPF144 Fundamentals of Computing TheorySlide 3 Basic Computer Abilities Read and write Arithmetic Process Communication Store data

4 Module 2CMPF144 Fundamentals of Computing TheorySlide 4 Examples on using computer Document preparation Communication Industry Banking and Finance Retailing Modelling /Simulation

5 Module 2CMPF144 Fundamentals of Computing TheorySlide 5 Computer Intelligence Definition of Intelligence Referring to Oxford Dictionary, Intelligent is understanding or quickness of understanding. o Another definition: - is the computational part of the ability to achieve goals in the world.  Computer Intelligence means computer that can be programmed to perform intelligence tasks that do not necessarily required any independent thinking.

6 Module 2CMPF144 Fundamentals of Computing TheorySlide 6 Computer Intelligence (cont.) Intelligence varies among people, animals and machines (computers) People  reading/learning/natural Animals  training/natural Computers  ??

7 Module 2CMPF144 Fundamentals of Computing TheorySlide 7 How to determine the intelligence According to De Silva, an intelligent system possesses one or more of the following characteristics and capabilities. Sensory perception Pattern recognition Learning and knowledge acquisition Inference from incomplete information Ability to deal with unfamiliar situations Common sense Inductive reasoning Inventiveness Display of emotions

8 Module 2CMPF144 Fundamentals of Computing TheorySlide 8 Continue.. Computer program operate using algorithms step by step to generate solutions The Turing Test is used as a gauge to determine whether or not an artificially intelligent being is intelligent or not. If the machine could successfully pretend to be human to a knowledgeable observer then you certainly should consider it intelligent. The Turing test is a one-sided test. A machine that passes the test should certainly be considered intelligent

9 Module 2CMPF144 Fundamentals of Computing TheorySlide 9 Example Develop an algorithm for a robot/computer to cross the road at the zebra crossing with traffic light

10 Module 2CMPF144 Fundamentals of Computing TheorySlide 10 Boolean Logic Has two values, True and False (Binary: 1 and 0, Electronic/Electrical: 5V and 0V) Three basic logics/operators; AND,OR,NOT Venn diagrams can be used to illustrate the concepts of Boolean

11 Module 2CMPF144 Fundamentals of Computing TheorySlide 11 Examples The diagram below shows the documents that the information is about Apple and Banana. Some documents, the ‘A’ region, having information about Apple only, some documents, the ‘B’ region having information about Banana only, while the C region is having both information on Apple and Banana. B C Banana A Apple

12 Module 2CMPF144 Fundamentals of Computing TheorySlide 12 AND AND means "I want only documents that contain both information on Apple and Banana." Document that has both words ‘Apple’ and ‘Banana’ can be found under ‘C’ region.Diagram below shows the result. B C Banana A Apple Apple+ Banana

13 Module 2CMPF144 Fundamentals of Computing TheorySlide 13 OR OR means "I want documents that contain either information on Apple or Banana”, either one not both. In diagram 3 below, the information can be from ‘A‘ region or ‘B’ region. A Apple B Banana

14 Module 2CMPF144 Fundamentals of Computing TheorySlide 14 NOT NOT means, “ I want document that contains information on Apple only, not Banana”. In the diagram 4 below, the documents only can be found on ‘A’ region. A Apple Banana

15 Module 2CMPF144 Fundamentals of Computing TheorySlide 15 Mixed Boolean operation  Boolean operators can be combined.  When combined the operators, we need to evaluate it based on order of evaluation or precedence.We can use parentheses (), in order to specify proper combination.

16 Module 2CMPF144 Fundamentals of Computing TheorySlide 16 Continue.. OperatorsOrder of evaluation (precedence) () Evaluated first. If the parentheses (), are nested the expression in the innermost pair is evaluated first. If there are several pairs of parentheses “on the same level” (not nested), they are evaluated left to right. *, /, % Evaluated second. If there are several, they are evaluated left to right. +, - Evaluated last. If there are several, they are evaluated left to right.

17 Module 2CMPF144 Fundamentals of Computing TheorySlide 17 Continue… Cats AND (Dogs OR Rabbits) The statement in parentheses - ' Dogs OR Rabbits’ - is processed first. Followed by the rest of the sentence.

18 Module 2CMPF144 Fundamentals of Computing TheorySlide 18 Continue.. If parentheses were omitted, Cats AND Dogs OR Rabbits The AND operation should process first, since based on precedence rules, the operation will start from left to right, anyway it varies among system, some will process AND first before OR. Therefore it is very important to use parentheses when we want to specify which operation should do first.

19 Module 2CMPF144 Fundamentals of Computing TheorySlide 19 Continue…

20 Module 2CMPF144 Fundamentals of Computing TheorySlide 20 Continue… (Dogs OR Rabbits) NOT Cats The statement in parentheses - 'Dogs OR Rabbits ‘- is processed first. Followed by the rest of the sentence.

21 Module 2CMPF144 Fundamentals of Computing TheorySlide 21 Complex Logic NAND,XOR, NOR and XNOR. The example below is using the Boolean algebra. Two variables will be used to store the data, which are A and B, while another one variable will keep the result of the operation, determined by Q. Example on OR and AND operator using the Boolean algebra. OR If both A and B is 0, therefore the result in Q will be 0. If either A or B is 1, therefore the result stored in Q will be 1

22 Module 2CMPF144 Fundamentals of Computing TheorySlide 22 AND AND In AND, if both A and B is having a value of 0, therefore the value stored in Q will be 0. If either one is having a value of 1 or 0, therefore the value in Q is still 0. The value in Q will only be 1 if both A and B having 1 as their value.

23 Module 2CMPF144 Fundamentals of Computing TheorySlide 23 Example: OR and AND ABQ 0 011 101 111 00 OR AND 0 ABQ 00 010 100 111

24 Module 2CMPF144 Fundamentals of Computing TheorySlide 24 NOR NOR - is a combination between NOT and OR. It’s simply an inversions of OR logic. If in OR, A=0,B=0 therefore Q = 0. But as inversion of OR, the result in Q will become 1.If the result in OR is 0, in NOR it will be 1, vice versa. ABQ 0 011 101 111 0 0 OR ABQ 001 010 100 110 NOR

25 Module 2CMPF144 Fundamentals of Computing TheorySlide 25 NAND NAND is a combination between NOT and AND logics. It is simply an inversion of AND logic. Example 1: If A = 0, B=0, using the AND operator, Q=0. However, as NAND is an inversion of AND, the answer in Q = 1.

26 Module 2CMPF144 Fundamentals of Computing TheorySlide 26 Example on NAND 0 ABQ 00 010 100 111 AND ABQ 001 011 101 110 NAND

27 Module 2CMPF144 Fundamentals of Computing TheorySlide 27 XOR and XNOR XOR - "exclusive or “- If either A OR B is 1, but NOT both, Q is 1. XNOR- "exclusive nor" - If A=0,B=0 or A=1,B=1, therefore Q =1.If either one of the operand is 0 or 1, NOT both, therefore Q will be 0.XNOR is an inversion of XOR.

28 Module 2CMPF144 Fundamentals of Computing TheorySlide 28 ABQ 00 011 101 110 Example on XOR and XNOR 0 XOR ABQ 001 010 100 111 XNOR

29 Module 2CMPF144 Fundamentals of Computing TheorySlide 29 Boolean Expression. A Boolean expression is used to construct queries that represent concepts. Boolean expressions (also known as conditions or predicates) are expressions that have two possible values - TRUE and FALSE Example: 2 < 5 (2 is less than 5)

30 Module 2CMPF144 Fundamentals of Computing TheorySlide 30 Continue… Boolean expressions are also called comparison expressions, conditional expressions, and relational expressions We can combine regular numeric, string and other expressions into Boolean conditions by comparing them to each other.

31 Module 2CMPF144 Fundamentals of Computing TheorySlide 31 Continue… expression < expressionLess than expression > expressionGreater than expression = expressionEventually expression != expression expression <> expression Not equals expression <= expressionLess than or equals expression >= expressionGreater than or equals

32 Module 2CMPF144 Fundamentals of Computing TheorySlide 32 Yes/No Trees Boolean approaches can be applied to develop a yes/no trees. The value of 1 can be represented by yes and 0 for no. The basic idea regarding yes/no trees is to find the solutions on certain questions based on these two data, yes/no answer. The reasons is to make the students think in order to cache the right answer by provide their solution pertaining to the mention scenario.

33 Module 2CMPF144 Fundamentals of Computing TheorySlide 33 Example: To guess the name of animal. Question: Does it have hair? Answer: yes Question: can it fly? Answer: no Question: Does it eat meat? Answer: Yes Question: Does it have a claw? Answer: Yes Question: Does it have a dark spots? Answer: No Question: Does it have black strips and tawny color? Answer: Yes Question: Is it tiger? Answer: Yes.

34 Module 2CMPF144 Fundamentals of Computing TheorySlide 34 Example: Yes/No tree

35 Module 2CMPF144 Fundamentals of Computing TheorySlide 35 Suggested Reading Sprankle,Maureen.(2001).Problem Solving and programming Concepts.5th ed. Prentice-Hall Cashman Waggoner, Shelly.(2000)Discovering Computers 2000. International Thompson Publishing http://www.webopedia.com/TERM/B/Boolean_expression.html http://www.shx.us/_notes/source/lang.boolean.html http://ww.ee.surrey.ac.uk/Projects/Labview/boolalgebra/ http://www.lib.csubak.edu/infocomp/search/boolean/venn.htm.htm.htm http://www.meadjohnson.com/products/hcp-adult- med/decision8.html


Download ppt "CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 2: Abilities of Computers."

Similar presentations


Ads by Google