Difference between revisions of "CSC231 Schedule 2010"

From dftwiki3
Jump to: navigation, search
(Weekly Schedule)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
--[[User:Thiebaut|D. Thiebaut]] 08:28, 6 January 2011 (EST)
 +
----
 +
 +
<br />
 
<center>
 
<center>
 
[[CSC231 | Back to Main Page]] | [http://cs.smith.edu/classwiki/index.php/CSC231_Page_(2010)  Class Wiki]
 
[[CSC231 | Back to Main Page]] | [http://cs.smith.edu/classwiki/index.php/CSC231_Page_(2010)  Class Wiki]
Line 303: Line 307:
 
; Monday
 
; Monday
 
* Continuation of Coverage of Recursion
 
* Continuation of Coverage of Recursion
* <videoflash>5X8cM2JiqzI</videoflash>
+
* <!--videoflash>5X8cM2JiqzI</videoflash-->
 
* Video: History of Computers
 
* Video: History of Computers
 
<tanbox>
 
<tanbox>
Line 336: Line 340:
  
 
----
 
----
* [[CSC231 Homework 9 2010 | Homework #9]] <-- Due date = 12/8 evening
+
* [[CSC231 Homework 9 2010 | Homework #9]] and [[CSC231 Homework 9 Solution 2010 | Solution Program]]
 
||
 
||
 
* [http://en.wikipedia.org/wiki/Compiler_optimization Compiler optimization] on wikipedia.
 
* [http://en.wikipedia.org/wiki/Compiler_optimization Compiler optimization] on wikipedia.
Line 384: Line 388:
 
**Cache-oriented
 
**Cache-oriented
 
***use of registers instead of memory ([http://ee.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1.2.html register variables])
 
***use of registers instead of memory ([http://ee.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1.2.html register variables])
 +
* A [[CSC231 generateRandomNumbers.asm| program]] to generate random numbers
 +
; Friday 12/10
 
* 2-D arrays
 
* 2-D arrays
* A [[CSC231 generateRandomNumbers.asm| program]] to generate random numbers
+
* Floating Point Numbers
 +
** Fixed-point format
 +
** [http://maven.smith.edu/~thiebaut/classes/231/floatingpoint.html Floating-Point Converter] applet.
 
----
 
----
* [[CSC231 Homework 10 2010 | (''Optional'') Homework #10]] <--- due date 12/14
+
* [[CSC231 Homework 10 2010 | (''Optional'') Homework #10]] and [[CSC231 Homework 10 Solution 2010| solution program]]
 
||  
 
||  
 
* [http://webster.cs.ucr.edu/AoA/Windows/HTML/Arraysa2.html 2D Arrays]
 
* [http://webster.cs.ucr.edu/AoA/Windows/HTML/Arraysa2.html 2D Arrays]
 +
* [http://steve.hollasch.net/cgindex/coding/ieeefloat.html A good introduction to Floating Point Numbers], nicely presented.  Similary, a [http://www.cs.princeton.edu/introcs/91float/ page] from Princeton's Intro to CS on floating points.
 +
* [http://en.wikipedia.org/wiki/Floating_point General description] of the floating-point notation on Wikipedia. 
 +
* [http://www.python.org/doc/2.5.2/tut/node16.html A very good description of the limitations] of floating-point numbers in Python: Read it!
 +
* Also, not to be missed: [http://www.lahey.com/float.htm  The perils of floating-point]
 +
* [http://www.programmers-corner.com/tutorial/31?PHPSESSID=4bbf1f2b76df390e1bad01a9f8462854 Floating Point in Assembly]: some high level stuff!
 +
*
 +
  
  
Line 395: Line 410:
 
| Week 15 <br /> 12/13  
 
| Week 15 <br /> 12/13  
 
||
 
||
* '''Monday''': '''Last Class'''
+
[[Image:CSC231RangeOfFloats.jpg |200px|right|link=http://jasss.soc.surrey.ac.uk/9/4/4.html]]
 +
; '''Monday''' ''<font color="magenta">Last Class</font>''
 +
* IEEE Floating-Point Representation
 +
** Exponent: 4 special cases: zero, denormalized numbers, infinity, NaN
 +
** [http://maven.smith.edu/~thiebaut/classes/231/floatingpoint.html Floating-Point Converter] applet.
 +
** Range of IEEE Floats
 +
** Compare range of floats to ints.  Ask [http://www.wolframalpha.com/input/?i=10^32+inches Wolfram Alpha] what is 10^32 inches!
 +
** Adding two floats
 +
** Examples of Floating-Point operations in Assembly
 +
*** [[CSC231 Float1.asm | float1.asm]]: printing a float in assembly
 +
*** [[CSC231 Float2.asm | float2.asm]]: transforms an int into a float
 +
*** [[CSC231 Float3.asm | float3.asm]]: computes  a = 10.5; b = 5.5; y = 3 * ( a - b ) + PI in assembly.
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
 
 
----
 
----
*
+
* [[CSC231_Lab_8 2010 | A Lab on Floating-Point Numbers] to explore on your own!
 +
* [[CSC231 Final Exam 2010 | Final Exam]] --> due date = ''12:00 p.m. on Monday December 20, 2010''
 
||  
 
||  
*
+
* [http://www.cs.umd.edu/class/spring2003/cmsc311/Notes/BinMath/addFloat.html Notes on adding floating-point numbers]
  
  
Line 412: Line 444:
 
== Assembly==
 
== Assembly==
  
* [[CSC231 FirstProg.asm | First program]] in assembly
+
* [[:Category:Asm | Assembly Programs]]
* [[CSC231_skeleton_program | Skeleton program]]
 
* [[CSC231 Hello World on Mac | Hello world!]] for the Mac
 
  
 
=Miscellaneous Information=
 
=Miscellaneous Information=

Latest revision as of 20:43, 3 November 2014

--D. Thiebaut 08:28, 6 January 2011 (EST)



Back to Main Page | Class Wiki


Weekly Schedule

Week Topics Reading
Week 1
9/08
Wed 9/8
  • Introduction
  • Syllabus
  • The PC
    • What's inside?
    • The main players
  • First program in assembly
    • structure
    • presentation
    • documentation
Fri 9/10

Week 2
9/13
Monday 9/13
  • Mini Lab
  • Assembling with the -l option to generate a listing
     nasm -f elf -F stabs -l helloworld.S helloworld.asm

  • The memory contains numbers only
  • Boolean Algebra
  • Binary system
  • logic expressions
Wednesday 9/15
  • Digital Electronics Lab in FH143
Friday 9/17
  • Digital Electronics Lab in FH143

Week 3
9/20
Pentium.gif
MultiCore.jpg
Monday 9/20
  • Three-bit adder. Review
  • A word on Verilog and FPGAs Examples
  • Architecture of the Pentium (simplified)
Wednesday 9/22
Friday 9/24
  • Comments on lab reports
  • Once again: Everything in memory is a number!
  • Review the reverse engineering example
  • Exercises on Binary/Hexadecimal (do on your own!)
  • The mov instruction (covered here).
    • Introduction to the 32-bit registers: EAX, EBX, ECX, EDX
    • Introduction to the 16-bit registers: AX, BX, CX, DX
    • Introduction to the 8-bit registers: AL, AH, BL, BH, CL, CH, DL, DH

Week 4
9/27
FibonacciPigeons.jpg
Monday 9/27
Wednesday 9/29
  • MOUNTAIN DAY!
Friday 10/1
  • Arithmetic instructions: ADD, SUB, INC, DEC
  • Logic instructions: AND, OR, NOT, XOR
  • using DDD to debug programs
  • Lab 4, Part 1

Week 5
10/04
Monday 10/4
Wednesday 10/6
  • Representing negative numbers, Signed Magnitude, 1's complement, 2's complement.
  • Exercises
Friday 10/8

Week 6
10/11
Monday
Fall Break
Wednesday 10/13
  • Review 2's complement
  • An example illlustrating what compiler code looks like.
  • Logic Design: Building a "subtractor" with an adder, using only AND, OR, NOT and XOR gates.
  • Mul/Div
  • Exercise: Teller Machine
Friday 10/15
  • Addressing Modes
  • Question of the day: What is an instruction set? Is there a best way to define an instruction set?
  • Pentium Instruction Set
  • Cool videos for a rainy afternoon
  • The main addressing modes:
    • inherent
    • register
    • immediate
    • direct
    • indirect/based/indexed
    • indirect with displacement
    • base-indexed
    • base-indexed with displacement
  • Exercises on Addressing Modes
  • Ascii Table

  • No homework assignment this week. Prepare for midterm!
  • The signed and unsigned representations of numbers are covered in Sections 1.7 and 1.8 of The Art of Assembly, and in Chapter 2 of Carter's PC Assembly Language.
  • Addressing modes are covered in Chapter 4 of The Art of Assembly. We won't cover "Displacement Only Addressing" modes (Section 4.6.2.1). Mentally replace 16-bit registers by 32-bit registers when reading this section.
Week 7
10/18
Monday 10/18
In class Midterm Exam
Sample Questions to get ready...
Wednesday 10/20
Friday 10/22
  • Lab 5
  • Loops and Addressing Modes


Week 8
10/25

Monday 10/25
  • The shift instructions: SHR, SHL, logical and arithmetic variants.
  • Sound waves, a bit of physics
  • The format of wav sound files
  • A demo program: readWaveFile.asm
Wednesday 10/27
  • Using a Makefile for Lab 5
  • Challenge of the day: clip 8-bit samples by forcing overflow to 0xff...
  • Examples with wav files:
  • Lab 6
Friday 10/29
  • Continue with Lab 6

Week 9
11/01
Monday 11/01
  • Functions
    • Using the stack
    • Passing parameters
      • by value
      • by reference
      • functions returning values
  • Exercises on Functions
Wednesday 11/03
  • Review of functions: passing parameters through registers
    • push/pop
    • organization (example program: maze.asm)
    • examples involving copying buffers
Friday 11/05
  • Passing parameters through the stack
  • Lab 7

Week 10
11/08
Monday 11/08
Wednesday 11/10
Friday 11/12

  • the preprocessor directive %define is fully explained here.
  • The PUSHAD instruction
Week 11
11/15
Monday 11/15
Wednesday 11/17
Friday 11/19

  • No homework assignment this week!
Week 12
11/22
Monday
  • Continuation of Coverage of Recursion
  • Video: History of Computers
TurkeyCarcass.jpg
Wednesday
Thanksgiving Break
Friday
Thanksgiving Break


Week 13
11/29
Monday 11/29
Wednesday 12/1
Friday 12/3

block (page) size      512-8192 bytes
hit time 1-10 clock cycles
miss penalty 100,000-600,000 clocks
(access time) (100,000-500,000 clocks)
(transfer time) (10,000-100,000 clocks)
miss rate 0.00001% - 0.001%
main memory size 4 MB - 2048 MB
Week 14
12/06
Monday 12/06
  • Continue with pipelines
  • Virtual Memory
Wednesday 12/08
  • Cache Memory
  • Average Access Time
  • Back to compiler optimization
    • Pipeline-related
      • Delayed branches
      • Instruction reordering
    • Cache-oriented
  • A program to generate random numbers
Friday 12/10


Week 15
12/13
CSC231RangeOfFloats.jpg
Monday Last Class
  • IEEE Floating-Point Representation
    • Exponent: 4 special cases: zero, denormalized numbers, infinity, NaN
    • Floating-Point Converter applet.
    • Range of IEEE Floats
    • Compare range of floats to ints. Ask Wolfram Alpha what is 10^32 inches!
    • Adding two floats
    • Examples of Floating-Point operations in Assembly






  • [[CSC231_Lab_8 2010 | A Lab on Floating-Point Numbers] to explore on your own!
  • Final Exam --> due date = 12:00 p.m. on Monday December 20, 2010



List of Selected Programs

Assembly

Miscellaneous Information

Linux Related