CS255 Syllabus & Progress

CS255 Syllabus & Progress


Material covered are displayed in blue.


    Search the lecture notes:


  1. Intro to CS255: click here

  2. Intro to Computer Architecture



  3. The Computer System (details of the memory and the CPU)



  4. The program translation (compilation) process - from high level language to machine code


    Homework 1 re-enforces computer architecture concepts:
    click here



    Before we can explain how the computer works - i.e., how it manipulates data, we must understand how information are stored inside the computer... This will be discussed next.

  5. Storing Boolean data inside a computer



  6. Representing and storing unsigned integer (= whole) numbers inside a computer



  7. Representing and storing signed integer (whole) numbers inside a computer


    Homework 2 re-enforces number system concepts: click here




  8. Representing text data inside the computer:

    • ASCII code: click here --- slides
    • Unicode: click here --- slides

    • Human <==> Computer communication (explains the need for conversion from ASCII to other representation and vice versa):

    • Boolean input and output:
      • Pre-requisite: Java Strings click here --- slides
      • How to enter Boolean inputs - converting between ASCII String representation and Boolean representation: click here --- slides
      • How computers print out Boolean outputs - converting between Boolean representation to ASCII String representation: click here --- slides

    • Numeric input/output - Converting between ASCII String representation and int 2's complement representation:
      • Introduction: click here --- slides

      • Java pre-requisites for String <==> Integer conversion:

      • How to enter integer inputs - Conversion algorithm ASCII representation -> 2's complement representation:
      • How computers print out integer values - Conversion algorithm 2's complement representation -> ASCII representation :

        (My old notes on conversion algorithms: click here)

    Project 3 re-enforces string ⟷ 2's complement conversion: click here




  9. Representing computer instructions inside the computer (intro to hardware):




  10. Intro to assembler programming using the ARM processor




  11. The two assembler program section/segments (text segment and data segment)





  12. Assembler programming with integer constants and simple integer variables





  13. The array data structure (teach with demo/asm/3-array/demo.s)





  14. The linked list data structure (teach with demo/asm/4-linked-list/demo1.s and demo2.s)


    Project 5 re-enforces access technique to structured variables (arrays and linked lists): click here



    • My summary notes on ARM assembler programming techniques used to prepare the CS255 material: click here
    • A single sheet summary of ARM instruction nmenomic codes : click here
    • Documentation - the complete ARM Instruction set and encoding (not part of syllabus material): click here



    Now you know what the computer actually does when it executes an assignment statement: how it evaluates an expression and assigns the result to a variable in a high level programming language. We will discuss various program flow control structures next.





  15. The Selection (if, if-else) Statements:






  16. The Loop Statements:



    Project 6 re-enforces the use of compare and branching in writing your first assembler program containing a while loop and if-statements: click here

    The midterm test will cover the material upto this point and will be scheduled soon.


    Now you know what the computer actually does when it runs a program. The only thing that you still do not know is what happens in a function call (there is still a lot to learn...).







  17. Subroutines (a.k.a. methods, procedures, functions)






  18. Leaf functions with parameters and local variables in CPU registers
    • Introduction: click here --- slides

    • Passing parameters to a function and passing return values using CPU registers:
      • Intro: using CPU registers to pass parameters and return values: click here --- slides
      • Sequencing of events in function call + return with parameters and return values: click here --- slides
      • sumSquares(a,b): using CPU registers to pass parameters and return values click here --- slides

    • sumRange(A, a, b): using registers as local variables: click here --- slides


    Project 7 (Bubblesort) re-enforces the use of registers for passing parameters and storing local variables: click here


  19. Non-Leaf functions with parameters and local variables in the runtime stack



  20. Recursive subroutines/methods: (are always non-leaf functions !)






  21. Recursion with linked lists: (study this chapter for yourself - everything has been covered perviously so material is repetative)



    Programming project pj9 re-enforces recursion with inserting in an ordered linked list: click here



  22. Parameter passing techniques:


    If you understand everything so far, you now know exactly what is going on when a computer executes a program. You can apply what you learn and write assembler programs in any assembler language, e.g., Intel Pentium, IBM PowerChip, DEC Alpha, SunMicrosystem SPARC... To program with a new chip, all you need to learn are:

    I have Intel assembler programming material after the C lecture notes to demonstrate this process. (These notes are not part of the CS255 curriculum - it's "for your eyes only")





    Abbreviated C teaching pages:

  23. Introduction to the (System Programming Language) C for Java programmers



  24. C's data types and variables:



  25. Basic input/output:



  26. Operators:



  27. Statements:



  28. Arrays: (C has static arrays, Java has dynamic arrays)



  29. Function (= method) definition:



  30. Function declaration:



  31. Multi-files C programs - the importance of declaring functions:


  32. The make (UNIX) utility: (Make will not be covered in the final)

    Hand out C Project 1: click here





  33. Intermediate topics: language features that are available in C and Java but work differently



  34. C language features that are not found in or different from Java (pointer data type !)





  35. Miscellaneous topics in C


    C documentations:


    That's all, Folks !





  36. Additional Enrichment Material: Intel 80x86 programming (not covered in CS255)


    Rough notes on Intel Assemler programming:

    Other resources:

    • Matloff GNU assembler programming tutorial: click here
    • Sourceforge GNU assembler programming tutorial: click here

    • Free Intel Macro Assembler (if you want to write assembler on your PC): RIGHT click here and SAVE AS
    • Intel Assembler Programming book - this book is like the CS255 course using Intel Assembler code: click here
    • Step by step Windows programming tutorial shows you how to write window programs, menus, call backs, etc: click here
    • The Art of Assembly Programming (a very good online book, but the 32 bit version uses a non-standard assembler called "HLA" - High Level Assemble language) click here