CS 1313 Spring 2000 Lecture Outline

Similar documents
Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Computer Programming C++ (wg) CCOs

Chapter 3: Operators, Expressions and Type Conversion

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Switching to AQA from OCR

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

The Arithmetic Operators. Unary Operators. Relational Operators. Examples of use of ++ and

The Arithmetic Operators

Java enum, casts, and others (Select portions of Chapters 4 & 5)


Page 1. Logistics. Introduction to Embedded Systems. My Records Indicate. Intel 4004 first single chip computer? Acronyms CS/ECE 6780/5780.

Where are we? Compiler. translating source code (C or Java) Programs to assembly language And linking your code to Library code

Control Structures. Lecture 4 COP 3014 Fall September 18, 2017

A Fast Review of C Essentials Part I

Digital Systems and Binary Numbers

Computer Systems. IGCSE OCR AQA Edexcel Understand the term. embedded system and how an Purpose of embedded system

This paper consists of 27 pages and the instructions for the completion of a mark-reading sheet.

Le L c e t c ur u e e 2 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Variables Operators

Computational Physics - Fortran February 1997

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

Syllabus for Computer Science General Part I

Our Strategy for Learning Fortran 90

Programming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee

Add Subtract Multiply Divide

Fundamentals of Programming

Switching to AQA from Edexcel

Instruction Sets: Characteristics and Functions Addressing Modes

Review for COSC 120 8/31/2017. Review for COSC 120 Computer Systems. Review for COSC 120 Computer Structure

What s inside your computer? Session 3. Peter Henderson

Introduction to Programming Using Java (98-388)

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

Operators and Expressions in C & C++ Mahesh Jangid Assistant Professor Manipal University, Jaipur

A Short Summary of Javali

Visual C# Instructor s Manual Table of Contents

Digital Logic Design Exercises. Assignment 1

Introduction to C. Why C? Difference between Python and C C compiler stages Basic syntax in C

Computer Organization

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

Chapter 3 Machine Instructions & Programs. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

KULLEĠĠ SAN BENEDITTU Secondary School, Kirkop

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

LAB A Translating Data to Binary

CS61C Machine Structures. Lecture 4 C Pointers and Arrays. 1/25/2006 John Wawrzynek. www-inst.eecs.berkeley.edu/~cs61c/

Goals for this Week. CSC 2400: Computer Systems. Bits, Bytes and Data Types. Binary number system. Finite representations of binary integers

Computer Organization and Assembly Language. Lab Session 01

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Computer Organization CS 206 T Lec# 2: Instruction Sets

Agenda. Peer Instruction Question 1. Peer Instruction Answer 1. Peer Instruction Question 2 6/22/2011

Harry H. Porter, 2006

EE292: Fundamentals of ECE

Contents. Preface. Introduction. Introduction to C Programming

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

ощ 'ршорвшэш! цвн-эориэу ощ 'sajbpossv # PIPG DUJ 'ssjmoossv ^ PIPG pipa w н OX ЛЮН VAV

Binary Values. CSE 410 Lecture 02

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

CS Programming In C

1.1. Unit 1. Integer Representation

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Lecture (01) Introduction Number Systems and Conversion (1)

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

DIGITAL SYSTEM DESIGN

SECONDARY SCHOOL, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2016/2017

Module 2: Computer Arithmetic

Lecture 3. More About C

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

Learning Log Title: CHAPTER 3: ARITHMETIC PROPERTIES. Date: Lesson: Chapter 3: Arithmetic Properties

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

Lecture 03 Bits, Bytes and Data Types

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

1 Lexical Considerations

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Bits and Bytes and Numbers

Outline. policies. with some potential answers... MCS 260 Lecture 19 Introduction to Computer Science Jan Verschelde, 24 February 2016

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

BCA-105 C Language What is C? History of C

Principles of Computer Science

Basic Operations jgrasp debugger Writing Programs & Checkstyle

ITEC 1011 Introduction to Information Technologies

Representing Information. Bit Juggling. - Representing information using bits - Number representations. - Some other bits - Chapters 1 and 2.3,2.

Basic data types. Building blocks of computation

17. Instruction Sets: Characteristics and Functions

Chapter 4. Operations on Data

Good Ideas - Revisited

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column

2. Integers. 9 * celsius / Celsius to Fahrenheit. Precedence. (9 * celsius / 5) + 32

Topic Notes: Bits and Bytes and Numbers

Where we are going (today)

Programming for the Web with PHP

Lexical Considerations

IB Computer Science Topic.2-

COMP 202 Java in one week

Zheng-Liang Lu Java Programming 45 / 79

More Programming Constructs -- Introduction

VARIABLES AND TYPES CITS1001

Unit 3. Operators. School of Science and Technology INTRODUCTION

Transcription:

1. What is a Computer? 2. Components of a Computer System Overview of Computing, Part 1 (a) Hardware Components i. Central Processing Unit ii. Main Memory iii. The Bus iv. Loading Data from Main Memory into the CPU v. Cache vi. Secondary Storage (b) Software Components i. Kinds of System Software 3. A Simple Fortran 90 Program 4. Some Basic Elements of a Fortran Program 5. Languages (a) Kinds of Languages (b) Programming Language Hierarchy (c) Converting Between Languages i. Compiling ii. Compiler Details iii. Elements of a Compiler iv. Compiling a Fortran 90 Statement v. Assembly Code Examples vi. Machine Code for helloworld.f90 vii. Why Not Do Everything in Machine Language? 6. The Programming Process 7. A Less Simple Fortran 90 Program 1

1. Memory Overview of Computing, Part 2 (a) What s All This RAM/ROM Stuff? (b) Bits, Bytes, Words, etc (c) Putting Bits Together (d) Powers of 2 (e) Kilo, Mega, Giga, Tera, Peta 2. Programming Language Hierarchy 3. Converting Between Languages (a) Compiling (b) Compiler Details (c) Elements of a Compiler (d) Compiling a Fortran 90 Statement (e) Assembly Code Examples (f) Machine Code for helloworld.f90 (g) Why Not Do Everything in Machine Language? 4. The Programming Process (a) What is an Algorithm? (b) An Example of the Programming Process (c) Compound Interest Algorithm in Detail (d) Code Development 2

1. Fortran 90 Character Set 2. Variables Data, Part 1: Variables (a) Variable Declaration (b) Variable Assignment (c) Variable Assignment Example (d) Variable Initialization (e) Variable Names (f) Implicitly Typed Variables Are BAD BAD BAD (g) Declaring Constants (h) Assigning Values to Variables via List-Directed Input (i) Multiple Variables Per Input (j) Program Variables vs. Algebra Variables (k) How Your Programs Should Look 3

1. Integers 2. Integer Declaration Data, Part 2: Integers 3. How Are Integers Represented in Memory? (a) Decimal Number Representation (b) Binary Number Representation (c) Converting from Binary to Decimal (d) Adding Integers (e) Binary Representation of Integers in Memory (f) Negative Integers (g) Representations of Negative Integers (h) A Curious Property of Two s Complement 4. Integer Constants 1. Integers 2. Integer Declaration More Detail About Integers 3. How Are Integers Represented in Memory? (a) Decimal Number Representation (Base 10) (b) Nonal Number Representation (Base 9) (c) Octal Number Representation (Base 8) (d) Trinary Number Representation (Base 3) (e) Binary Number Representation (Base 2) (f) Converting from Base 2 to Base 10 (g) Counting in Base 10 (Decimal); Counting in Base 9 (Nonal) (h) Counting in Base 8 (Octal); Counting in Base 3 (Trinary) (i) Counting in Base 2 (Binary) (j) Adding Integers (k) Binary Representation of Integers in Memory (l) Negative Integers (m) Representations of Negative Integers (n) A Curious Property of Two s Complement 4. Integer Constants 4

Data, Part 3: Reals and Complex Numbers 1. Reals 2. Real Declaration 3. Scientific Notation 4. How Are Reals Represented in Memory? 5. Why Can Fortran 90 Reals Only Approximate Mathematical Reals? 6. Real Approximation Example 7. Real Constants 8. Why Have Both Reals and Integers? 9. Complex Numbers 10. Complex Declaration 11. Complex Constants 1. Arithmetic Expressions Numeric Expressions (a) Structure of Arithmetic Expressions (b) Priority Order of Arithmetic Expressions (c) Arithmetic Priority Order Example 2. Modes (a) Single Mode Arithmetic (b) Division By Zero (c) Mixed Mode Arithmetic (d) A Mixed Mode Arithmetic Example 3. Assignments Using Expressions 1. Logicals (Booleans) 2. Logical Constants 3. Logical Expressions Logical Variables and Expressions (a) Truth Tables (b) Structure of Logical Expressions (c) Priority Order of Logical Expressions (d) Logical Expression Example (e) Relational Operations (f) Relational Expression Example 5

1. IF - THEN - END IF 2. IF - THEN - END IF Example 3. IF - THEN - ELSE - END IF Selection, Part 1: IF-THEN 4. IF - THEN - ELSE - END IF Example 5. IF - THEN - ELSE IF - END IF 6. IF - THEN - ELSE IF - END IF Example 7. Mixing and Matching Selection Blocks 8. IF - THEN - ELSE IF - ELSE - END IF Example 9. Nested Block-IFs 10. Nested Block-IF Example Program 11. Nested Block-IF Example Output 12. The Logical-IF Statement (a) Logical-IF vs. Block-IF (b) Can t Nest Logical-IF Statements Selection, Part 1: IF-THEN in Nauseating Detail 1. IF - THEN - END IF 2. IF - THEN - ELSE - END IF 3. IF - THEN - ELSE IF - END IF #1 4. IF - THEN - ELSE IF - END IF #2 5. IF - THEN - ELSE IF - END IF #3 6. IF - THEN - ELSE IF - END IF #4 7. IF - THEN - ELSE IF - END IF #5 8. IF - THEN - ELSE IF - END IF #6 9. IF - THEN - ELSE IF - END IF #7 10. IF - THEN - ELSE IF - ELSE - END IF #1 11. IF - THEN - ELSE IF - ELSE - END IF #2 12. Nested IF - THEN - END IF #1 13. Nested IF - THEN - END IF #2 14. Nested IF - THEN - ELSE - END IF #1 15. Nested IF - THEN - ELSE - END IF #2 16. Nested IF - THEN - ELSE - END IF #3 6

1. The DO Loop Repetition, Part 1 (a) DO Loop Details (b) DO Loop with an Implied Increment (c) DO Loop with a Negative Increment (d) DO Loop with Expressions (e) DO Loop with a REAL Counter i. Replacing a REAL Counter with an INTEGER Counter (f) Debugging a DO Loop i. Debugging a DO Loop: PRINT Statements in the Loop Body ii. Debugging a DO Loop: PRINT Statements (continued) iii. Debugging a DO Loop: Removing PRINT Statements (g) The EXIT Statement (h) Output of EXIT Statement Example (i) The CYCLE Statement (j) Output of CYCLE Statement Example (k) Nesting DO Loops Inside IF-THEN Blocks and Vice Versa (l) Nested DO Loops (m) Output of Nested DO Loop Example (n) Changing the Loop Bounds Inside the Loop: BAD BAD BAD! (o) Changing the Loop Index Inside the Loop: ILLEGAL! (p) Implicitly Controlled DO Loop (q) Implicitly Controlled DO Loop Example Output (r) DO WHILE Loop (s) Improved DO WHILE Loop (t) Hoisting and Sinking Out of a Loop Repetition, Part 2 1. Simple DO Loop Example 2. Simple DO Loop Example with Implied Loop Increment of 1 3. Another DO Loop Example 4. The Same DO Loop Example Without Debug Output 5. DO Loop with Increment /= 1 6. Another DO Loop Example with Increment /= 1 7. DO Loop with Negative Increment 8. Aside: the STOP Statement 7

One-Dimensional Arrays 1. Arrays 2. Array Declarations 3. Assigning a Value to an Array Element 4. Array Initialization 5. Setting an Array to a Scalar Value 6. Reading in an Array s Values Using an Explicitly Count-Controlled DO Loop 7. Explicitly Count-Controlled DO Loop Behaves the Same as Several Statements 8. Reading in an Array s Values Using an Implied DO Loop 9. Implied DO Loop in READ Behaves the Same as READ With a List 10. Using an Implied DO Loop in an Array Constructor 11. Nonstandard Lower Bounds on Arrays 12. Implied Lower Bounds on Arrays 13. Aside: Why We Like Declaring Named Constants 14. Declaring Named Constants for Loop Bounds 15. Computing with Arrays 16. Computing with Arrays (continued) 17. Compiling Optimization 18. Compiling Optimization Output 8

Multidimensional Arrays 1. Multidimensional Arrays 2. How a 2D Array is Stored in Memory 3. What a 2D Array Looks Like 4. Multidimensional Array Declarations 5. Assigning a Value to a Multidimensional Array Element 6. Reading a Value into a Multidimensional Array Element 7. Multidimensional Array Initialization 8. Multidimensional Array Assignment: Tricky 9. Initializing an Array to a Scalar Value 10. Assigning a Scalar Value to an Array 11. Reading in an Array s Values Using Nested Explicitly Count-Controlled DO Loops 12. Explicitly Count-Controlled DO Loops Behave the Same as Several Statements 13. Reading in an Array s Values Using an Implied DO Loop 14. Implied DO Loop in READ Behaves the Same as READ With a List 15. Using an Implied DO Loop in an Array Constructor 16. Nonstandard Lower Bounds on Arrays 17. Implied Lower Bounds on Arrays 18. Aside: Why We Like Declaring Named Constants 19. Declaring Named Constants for Loop Bounds 20. Computing with Multidimensional Arrays 21. Computing with Multidimensional Arrays (continued) 22. Compiling Optimization 23. Compiling Optimization Output 24. 3D Arrays 9