🎓

COMP1521 Week 1 Lecture 1 Course Overview and Content

Jun 17, 2025

Overview

This lecture introduces the COMP1521 course, including staff, format, key expectations, and begins with foundational content on program execution, memory layout, and the basics of MIPS assembly language.

Course Introduction

  • COMP1521 focuses on computer systems, including low-level programming and assembly.
  • Course information, resources, and staff contacts are on the course website; bookmark it.
  • Moodle is used for lecture streaming/recording and some online sessions via Blackboard Collaborate.
  • Major course staff roles: lecturer, convenor, admins, moderators, and tutors (30+).
  • Most students have completed introductory C (COMP1511/1911).

Course Expectations & Structure

  • Review and strengthen C programming skills (esp. recursion, pointers, dynamic memory).
  • Further develop Linux command-line, coding, and debugging skills.
  • Become less reliant on auto-tests; learn to design and test your own cases.
  • Learn to read documentation and manual pages (man).
  • Weekly lectures (2x2 hours), 3-hour tutorial/lab blocks, weekly online tests (from week 3), 2 assignments, and a final exam.

Assessment Details

  • Labs: Weekly, individual coding tasks, automarked, total 15%. Lab 1 due in week 3, others one week after completion.
  • Tests: Best 6 out of 8 count for 10%, released Thursdays, due in a week, self-enforced exam conditions.
  • Assignments: Two (Assembly and C systems programming), each worth 15%, no group work, no generative AI.
  • Final Exam: 45%, practical, in-person, must score at least 18/45 to pass the course.

Policies & Conduct

  • All work must be individual; no code sharing or online posting (e.g., GitHub).
  • Plagiarism and misuse of generative AI are academic misconduct.
  • Inclusive and respectful learning environment; inappropriate behavior not tolerated.

Getting Help & Course Tools

  • Use forums, help sessions, and one-on-one tutor support.
  • Weekly C revision and extra help available (booking required).
  • Lab computers and VLAB remote access mirror CSC environments; use SSH or VLAB as needed.
  • Use tools like dcc, clang, make, man; man pages provided during exams.
  • Practice without personal customizations/extensions (e.g., VS Code settings) for the exam setup.

How Programs Run & Memory Layout

  • Source code must be compiled into machine code (binary) before execution.
  • Program stored on disk, loaded to RAM for execution.
  • Memory layout: text/code segment (instructions, read-only), data segment (constants, globals), heap (dynamic memory), stack (local variables, function calls).
  • Stack grows/shrinks with function calls/returns; stack overflow by infinite recursion causes segmentation faults.

CPU, Machine Code & Assembly Basics

  • CPUs fetch, decode, and execute instructions from memory, incrementing the program counter.
  • Instructions can manipulate data, control execution flow (branches), and interact with memory.
  • Machine code is binary; assembly is readable mnemonics, mapped 1:1 with machine code.
  • Assembler translates assembly to machine code; different architectures use different instruction sets.

MIPS Assembly & CPU Architecture

  • Focus of this course is MIPS assembly (used in Nintendo 64, routers, etc.).
  • MIPS has a simple, educational instruction set; easy to learn, foundational for other architectures.
  • CPU contains general-purpose and special registers (e.g., t0-t9 for calculations, r0 always zero, ra for return address).
  • Computations mostly occur in registers; memory accessed via load/store instructions.
  • MIPS programs can be emulated via command line, web tools, or VS Code extension.

Key Terms & Definitions

  • Compiler — Translates high-level code to machine code.
  • Assembler — Converts assembly code to machine (binary) code.
  • Machine Code — Binary instructions executed directly by CPU.
  • Assembly Language — Human-readable representation of machine instructions.
  • Register — Small, fast CPU storage for computations.
  • Stack — Memory area for function call management; grows/shrinks with calls/returns.
  • Heap — Dynamically allocated memory during program execution.
  • Program Counter (PC) — Register holding address of next instruction to execute.
  • Immediate — Constant value directly encoded in an instruction.
  • Instruction Set Architecture (ISA) — Defines CPU’s supported instructions and encoding.

Action Items / Next Steps

  • Bookmark and read the course website and outline.
  • Set up access to VLAB or SSH for lab environments.
  • Review assumed C knowledge and begin tutorial problems before class.
  • Try using the MIPS web emulator and familiarize yourself with the documentation.
  • Attend your assigned tutorials/labs and participate in discussions.