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