Fall 2016 / DM548
Computer Architecture

General Information

Important Information for DM544 students

In case you are enrolled in a study program requiring you to pass the 5 ECTS version of computer architecture (DM544), please get in touch with me as soon as possible. Be aware that you have to complete the assembly assignment by November 8th in order to be eligible for the oral exam.

Course introduction

The course introduces the student to the architecture of general purpose computers, from the logic level over the microprogramming level to the conventional ISA level; also major components in the storage hierarchy, bus architectures and the organization of pipelined CPU's are presented. In addition, the main aspects of a system programming language are introduced.

Topics Covered

The student will obtain insight into the organization of modern computers and their CPU's, in order to be able to compare and evaluate their performance on a level independent of the specific technology. More specifically the course provide the following competences:

  • to understand basic logic diagrams, and to express the functionality of basic CPU components in terms of such diagrams.
  • to express the functionality of an ISA level instruction by interpretation on an underlying (micro)architecture.
  • to be able to interpret ordinary binary integer and floating point number representations, and to be able to convert between these.
  • to know and be able to explain the properties and limitations of the different storage components, including their addressing, and to evaluate the performance of a multi-level storage hierarchy.
  • to be able to explain and discuss the exploitation of parallelism in the form of pipelining, their limitations, and the distribution of tasks on multiple functional units.
  • to be able to explain and discuss the internal organization and internal communication paths at a high level, including communication with external units and interrupts from these.
  • to express the functionality of a given algorithm as an assembler program, including to bring such a program to execution on a specific machine.
  • to express the functionality of a given algorithm as a system program, including to bring such a program to execution on a specific machine.


During the course the students have to complete two mandatory projects. One project will cover programming in assembly language, the other will cover system programming. Both projects will be evaluated with pass/fail and need to be passed in order to be eligible for the written exam at the end of the semester. Please go to the according section of the website for examples of old exams. The lab courses are mainly targeted towards the mandatory projects, the exercises mostly prepare for the written exam.

All about the Exam

The written exam will follow in terms of style, difficulty, and length (4h) the exams of the previous years. Below, you will find a link to download examples of previous years (unfortunately in Danish language only). This years exam will be in English. Also note, that the old exams miss the systems programming part of this years lecture. Furthermore, the old exams used a different assembly language, so there might be parts in them which are no longer relevant for you.

Information about the exact time and location will follow in due course.

Download very old (and only party relevant) exams here. Relevant Exam from 2014 exam and solution. This year's exam will follow this exam in style and type of questions ... with different questions, though :-)


# Date Content Slides Readings
1 Thu, 08.09.2016 Introduction here Chapter 2
2 Tue, 13.09.2016 Computer Arithmetic here Chapter 9 & 10
3 Tue, 20.09.2016 Introduction to Assembly here Chapters 12 & 13
4 Thu, 22.09.2016 Continuation of last Lecture -- --
5 Tue, 27.09.2016 Digital Logic here Chapter 11
6 Tue, 04.10.2016 Top Level View here Chapter 3
7 Thu, 06.10.2016 Caches here Chapter 4
8 Tue, 11.10.2016 Memory here Chapter 5 & 6
9 Tue, 25.10.2016 I/O here Chapter 7
10 Thu, 27.10.2016 Operating System Support here Chapter 8
11 Tue, 01.11.2016 Processor Structure and Pipelining here Chapter 14
12 Tue, 08.11.2016 RISC here Chapter 15
13 Thu, 10.11.2016 Superscalar Processors here Chapteres 16, 17, 18
14 Tue, 22.11.2016 Control Unit here
15 Thu, 24.11.2016 Introduction to C here
16 Tue, 29.11.2016 Control Flow & I/O here
17 Thu, 01.12.2016 CANCELED
18 Tue, 06.12.2016 Pointers here
19 Thu, 08.12.2016 Make Files and Libraries here
20 Tue, 13.12.2016 Memory Management here
21 Thu, 15.12.2016 Q & A session -- --


Assignment 1 - Sorting in Assembler

Download this pdf (17.10.2016, updated with instrucions for team submissions) in order to receive all necessary information for the first assignment.

The deadline is Sunday, November 6th before Midnight Danish time

You are allowed to work in teams of up to five students. Please only submit one file per team and include all team members' names in the README file.

In case you have any questions or doubts, do not hesitate to ask us. Use the lab snippets and the cheat sheet to recycle helpful snippets (e.g., reading files)!

Collection of useful snippets: here.

Assignment 2 - String Vector in C

Download this pdf in order to receive all necessary information for the second assignment.

The deadline is Friday, December 16th before Midnight Danish time.

You should use the following header file for your data structure: vector.h There will be no extended deadline for this assignment! You have to pass this assignment in order to be eligible for the exam! You are allowed to work in teams of up to five students. Please only submit one file per team and include all team members' names in the README file.


# Date Topic Questions Solution
1 Thu, 15.09.2016 Computer Arithmetic here
2 Thu, 29.09.2016 Arithmetic and Boolean Algebra here
3 Thu, 13.10.2016 Cache and Memory here
4 Thu, 03.11.2016 Virtual Memory here
5 Wed, 23.11.2016 Processor Structure, RISC here
6 Wed, 07.12.2016 Superscalar and Multiprocessing here
7 Thu, 15.12.2016 Q & A Session -- --


Do not forget to read the Cheat Sheet by Svend!

# Date Topic Assignment Solution
1 Fri, 23.09.2016 Introduction to Assembly here
2 Fri, 30.09.2016 I/O in Assembly here here
3 Fri, 07.10.2016 More Assembly here here
4 Fri, 14.10.2016 Q&A session for the assignment -- --
5 Wed, 26.10.2016 Q&A session for the assignment -- --
6 Fri, 02.12.2016 Introduction to C here
7 Fri, 09.12.2016


We are using the following Textbook:

  • William Stallings: Computer Organization and Architecture - Designing for Performance, 8th, 9th or 10th edition, Pearson, 2013/2014/2015.
  • Assembler Cheat Sheet by Svend!

Furthermore, all lecture slides are relevant for the exams.

Very good and regularly updated C manual: link

Differences between Intel and ATT syntax: link

GNU Assembler Manual: link

x86 Assembly Wiki Book: link

x86 Opcode and Instruction Reference: link

x86_64 Cheat sheet: link

Linux syscalls: 32bit, 64bit.