LAB-03 Logical Operations I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum.

Slides:



Advertisements
Similar presentations
WHERE Clause Chapter 2. Objectives Limit rows by using a WHERE clause Use the LIKE operator Effect of NULL values Use compound conditions Use the BETWEEN.
Advertisements

Propositional Predicate
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 2.5 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals B.3 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
Conditional statements and Boolean expressions. The if-statement in Java (1) The if-statement is a conditional statement The statement is executed only.
LAB-04 IF Structure I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
1 ICS 101 – LAB 2 Arithmetic Operations I Putu Danu Raharja kfupm.edu.sa Information & Computer Science Department CCSE - King Fahd University.
1-1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Exercise Exercise3.1 8 Exercise3.1 9 Exercise
ME 307 Machine Design I Dr. A. Bazoune Chapter 7: Fatigue Failure Resulting from variable Loading Dr. A. Aziz Bazoune King Fahd University of Petroleum.
ICS 201 Course Overview.
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
COE 485 Senior Design Project Group # 5 Week 8 Term 042 King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer.
Lecture 8 Analysis of Recursive Algorithms King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer.
Exercise Exercise Exercise Exercise
1-1 ICS201: Introduction To Computer Science King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer.
Exercise Exercise Exercise Exercise
Exercise Exercise6.1 7 Exercise6.1 8 Exercise6.1 9.
LAB-05 Function I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
™ FORCASTING (LO-PR) Material Forecasting Forecasting in SAP (LO-PR)
Expressions and statements Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences.
Fall 2006AE6382 Design Computing1 Relational and Logical Operators Use relational operators to test two values Work with values of true and false Compare.
King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Department of Computer Engineering Senior Design Project COE.
LAB-03 Logical Operations I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum.
ICS 101 – Introduction to Computer Programming I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University.
Programming with MATLAB. Relational Operators The arithmetic operators has precedence over relational operators.
LAB-12 2-D Array I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
LAB-10 1-D Array I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
Computer Science 101 The Boolean System. George Boole British mathematician ( ) Boolean algebra –Logic –Set theory –Circuits –Conditions in if.
ICS201 Lecture 12 : Gentle Introduction to Computer Graphics II King Fahd University of Petroleum & Minerals College of Computer Science & Engineering.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 2.2 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
KFUPM-COE Industrial Advisory Council Meeting 31/5/ Department of Computer Engineering (COE) College of Computer Sciences and Engineering (CCSE)
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 2.7 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals B.2 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
Lecture 18: 10/31/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand how decisions are made in a computer ❏ To understand the logical.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 3.6 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals B.1 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals A1 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
IB Computer Science – Logic
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 3.3 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
Doing math In java.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 3.4 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
Visual Basic CDA College Limassol Campus COM123 Visual Basic Programming Semester C Lecture:Pelekanou Olga Week 4: Understand and implement Decisions.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
LAB-09 DO WHILE loop I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals 2.6 E - BOOK FOR COLLEGE ALGEBRA King Fahd University of Petroleum & Minerals.
ICS 253: Discrete Structures I
Chapter 1: Real Numbers and Equations Section 1.3: Variables and Expressions.
ICS102 Lecture 8 : Boolean Expressions King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Random Functions Selection Structure Comparison Operators Logical Operator
if ( condition ) statement; if is a Java reserved word The condition must be a boolean expression. It must evaluate to either true or false.
Unit 6 Analysis of Recursive Algorithms
Sequence, Selection, Iteration The IF Statement
ALU Design: Shifter Details
If statement.
Computers & Programming Languages
Bools and simple if statements
Types, Truth, and Expressions (Part 2)
Types, Truth, and Expressions (Part 2)
ICS 253: Discrete Structures I
Types, Truth, and Expressions (Part 2)
LAB-06 IF + Functions I Putu Danu Raharja
Expressions.
ICS 253: Discrete Structures I
Selection—Making Decisions
Topics discussed in this section:
Whole Number Arithmetic
ICS 101 Lab 3 Hossain Arif ICS Dept
Presentation transcript:

LAB-03 Logical Operations I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals

ICS101-LAB03-Term063 2 Logical Operators By the order of precedence:.NOT..AND..OR.

ICS101-LAB03-Term063 3 Relational Operators Returns logical value (.TRUE. Or.FALSE.).EQ..NE..GT..GE..LT..LE. Their precedence are lower than arithmetic operations.

ICS101-LAB03-Term063 4 Exercise-1 Write a program that evaluates the following expressions: X > 7 X < 10 4 <= X <= > X >= > X > 50 (X > 8) AND (Y >= 19)

ICS101-LAB03-Term063 5 Exercise-2 REAL X, Y LOGICAL TEST X= 1.0/3.0 Y= X*3.0 TEST = (Y.EQ. 1.0) PRINT *, “IT IS “, ‘ ‘, TEST, “ THAT “, Y, “ = “, 1.0 TEST = (X.EQ ) PRINT *, “IT IS “, ‘ ‘, TEST, “ THAT “, X, “ = “, END

ICS101-LAB03-Term063 6 Exercise-3 Write a program to test the following equivalences:.NOT.(A.GT. B.AND. B.LT. C) A.LE. B.OR. B.GE. C