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

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Logic Gates.
Programming Logic Gate Functions in PLCs
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
1 MATERI PENDUKUNG OPERATOR Matakuliah: M0074/PROGRAMMING II Tahun: 2005 Versi: 1/0.
Copyright © Cengage Learning. All rights reserved.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Lesson Objective: I can…
PHY 201 (Blum)1 Some basic electronics and truth tables Some material on truth tables can be found in Chapters 3 through 5 of Digital Principles (Tokheim)
C++ Operators CS242 COMPUTER PROGRAMMING T.Banan Al-Hadlaq.
CS 462: Introduction to Artificial Intelligence This course advocates the physical-symbol system hypothesis formulated by Newell and Simon in It.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Artificial Intelligence: Definition “... the branch of computer science that is concerned with the automation of intelligent behavior.” (Luger, 2009) “The.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
CSci 125 Lecture 10 Martin van Bommel. Simple Statements Expression followed by semicolon Assignments total = n1 + n2; Function calls printf(”Hello.\n”);
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 5: Classical Logic.
Copyright © Curt Hill Mathematical Logic An Introduction.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Programming Fundamental Slides1 Data Types, Identifiers, and Expressions Topics to cover here: Data types Variables and Identifiers Arithmetic and Logical.
MATH 224 – Discrete Mathematics
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Some basic electronics and truth tables Some material on truth tables can be found in Chapter 3 of Digital Principles (Tokheim)
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Relational and Boolean Operators CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Logic UNIT 1.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
Lecture 18: Boolean Algebra Boolean Functions. w = Chris is allowed to watch television x = Chris's homework is finished y = it is a school night z =
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
 Most C programs perform calculations using the C arithmetic operators (Fig. 2.9).  Note the use of various special symbols not used in algebra.  The.
MECH 1500 Chapter 4. MECH 1500 The Binary Concept 4.1.
5 Lecture in math Predicates Induction Combinatorics.
BOOLEAN ALGEBRA BIRLA VISHVAKARMA MAHAVDYALAYA V. V. NAGAR Guided By: Prof. P. B. Swadas Prepared By:
CHAPTER 2 Boolean algebra and Logic gates
Boolean Algebra Learning Objectives Learn that Boolean algebra produces a result that equals TRUE or FALSE Learn how truth tables are used to represent.
Control Structures I Chapter 3
Computer Architecture & Operations I
Logic.
Computer Architecture & Operations I
Boolean Algebra & Logic Gates
Morgan Kaufmann Publishers
Computer Science 210 Computer Organization
ARITHMETIC IN C Operators.
Operators and Expressions
Lecture 1 – Formal Logic.
Data Types, Identifiers, and Expressions
Expressions An expression is a portion of a C++ statement that performs an evaluation of some kind Generally requires that a computation or data manipulation.
Component 1 – 2A, B, C Binary Logic
Decision Making in Code Logical Tests & Truth Logical Expressions
Fundamentals & Ethics of Information Systems IS 201
JavaScript: Control Statements.
Some basic electronics and truth tables
Data Types, Identifiers, and Expressions
Computers & Programming Languages
Lecture 14: Boolean Algebra
Computer Science 210 Computer Organization
Expressions An expression is a portion of a C++ statement that performs an evaluation of some kind Generally requires that a computation or data manipulation.
Expressions.
Chapter 7 Expressions and Assignment Statements.
Some basic electronics and truth tables
ECS15 boolean.
Truth tables Mrs. Palmer.
Copyright © Cengage Learning. All rights reserved.
Chapter 2, Part III Arithmetic Operators and Decision Making
Presentation transcript:

CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 2: Abilities of Computers

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

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

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

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.

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  ??

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

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

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

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

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

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

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

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

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.

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.

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.

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.

Module 2CMPF144 Fundamentals of Computing TheorySlide 19 Continue…

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.

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

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.

Module 2CMPF144 Fundamentals of Computing TheorySlide 23 Example: OR and AND ABQ OR AND 0 ABQ

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 OR ABQ NOR

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.

Module 2CMPF144 Fundamentals of Computing TheorySlide 26 Example on NAND 0 ABQ AND ABQ NAND

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.

Module 2CMPF144 Fundamentals of Computing TheorySlide 28 ABQ Example on XOR and XNOR 0 XOR ABQ XNOR

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)

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.

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

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.

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.

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

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 International Thompson Publishing med/decision8.html