Dec 21, 2024  
Catalog 2024-2025 
    
Catalog 2024-2025

CS 205 System Programming and Architecture


Lecture Hours: 4
Credits: 4

Introduces how high-level software runs on a computer system. Covers C programming and the assembly that C code becomes. Presents the fundamentals of computer architecture and how instructions and data are represented at the machine level. Provides experience analyzing compiled code to build necessary skills for future work in cybersecurity, operating systems, compilers, and other CS topics involving low-level computation.

Prerequisite: Placement into WR 115  or completion of WR 090  and CS 161 , each with a grade of C or better; or consent of instructor.
Student Learning Outcomes:
  1. Describe the major components of computer architecture; explain their purposes and interactions and the instruction execution cycle. 
  2. Describe a basic instruction set architecture, including the arithmetic, logic, and control instructions; user and control registers; and addressing modes. 
  3. Do simple arithmetic in hexadecimal, decimal, and binary notation, and convert among these notations. 
  4. Explain how data types such as integers, characters, pointers, and floating point numbers are represented and used at the assembly level. 
  5. Write C language programs that use control structures, functions, IO, arrays, and dynamic memory. 
  6. Describe each step of the compilation process by which C language programs are transformed into machine code. 
  7. Explain how high-level programming constructs such as arrays, structures, loops, and stack-based function calls are implemented in  machine code. Recognize and reverse engineer same. 
  8. Demonstrate and use a debugger to analyze program flow, inspect register and stack contents. 
  9. Identify and fix performance issues in C programs that are caused by machine level concepts. 
  10. Explain how the information in this course is important within the overall context of computer science. 


Content Outline
  • Introductions to Systems 
    • Fundamentals of architecture and the machine cycle 
    • Memory hierarchy 
    • Role of operating systems 
  • C Fundamentals 
    • Basic C syntax 
    • IO and File instructions 
    • Compiling, Running, and Debugging 
  • Compiling, Linking, And Loading 
    • Compilation process and tools 
    • Object files 
    • Linking & symbol resolution 
  • Data Representation 
    • Binary and Hex 
    • Representation of fundamental C data types 
    • Representation of machine instructions 
  • Arithmetic in C and Assembly 
    • Signed and unsigned integer representations 
    • Floating point number system 
  • Bitwise Operations 
    • Logic operations 
    • Shifts and rotates 
  • Control Structures in C and Assembly 
    • Implementation of C control structures in assembly 
    • Jump and branch tables 
  • Memory and Pointers 
    • Accessing and referencing memory in C and assembly 
    • Layout of stack and using it to store data 
  • Dynamic Memory 
    • Memory management in C 
    • The heap and standard memory model 
  • Functions 
    • Functions in C 
    • Implementation of C functions in assembly 
    • Call stack organization and conventions 
  • Arrays and C-strings 
    • Arrays and strings in C and relation to pointers 
    • Array access in assembly 
    • Buffers and overflow attacks 
  • Heterogeneous Structures 
    • Structs and unions 
    • Data alignment and byte packing 
  • Optimizations in C 
    • Basic compiler optimizations 
    • Relative performance of different operations 
    • Optimizations available to high level programmers based on systems concepts 
  • Systems Programming in Context 
    • Ideas applied to Operating Systems, Cybersecurity, or another area of CS