Module Identifier CHM3220  
Academic Year 2004/2005  
Co-ordinator Dr Adrian D Shaw  
Semester Semester 1  
Other staff Dr Adrian D Shaw, Mr David E Price, Mr Peter Hoskins  
Pre-Requisite Available only to students taking the Diploma/MSc in Computer Science scheme  
Co-Requisite CH21120  
Course delivery Lecture   44 lectures  
  Practical   up to 11 x 2 hours  
Assessment TypeAssessment Length/DetailsProportion
Semester Assessment2 Hours written exam  50%
Semester Assessment 1 programming assignment (60 hours)  50%
Supplementary Assessment Supplementary examination will take the same form, under the terms of the Department's policy.   

Learning outcomes

On successful completion of this module students should be able to:
1. analyse a block diagram of a computer and explain how it works at the level of logic gates

2. analyse and develop low level programs and describe how they are executed by a CPU.

3. describe how a computer performs input and output operations.

4. explain how abstract concepts in high-level languages, such as `function call' or `local variable', are implemented in machine code.

5. judge the applicability of high and low level language programming.

6. demonstrate an extensive knowledge of the nature of the computer language "C" including the more challenging aspects of the language.

7. apply the facilities of the language "C" to technically advanced problems.

8. describe the differences between object oriented languages (such as Java) and non-OO languages (such as C) and make appropriate choices between such languages to solve a range of realistic problems.


We merge two previous 10-credit modules: Computer Architecture and The Unix Environment And The C Language into a single 20-credit module. 20-credit modules provide for more integrated material. This module presents the computer at several levels of abstraction, from low-level hardware up to the operating system controlling the hardware and user applications.

Brief description

This module looks at the underlying hardware components used within a computer system and how they are linked. It goes on to cover the direct programming interaction with those components, through assembly language programming. The UNIX operating system will be introduced and used for practical work. Students will learn to use the ANSI-C language in the UNIX context.


1. Introduction

Overall introduction to the module.

2. What is a computer?

Block diagram overview; CPU, memory, I/O, Bus. Memory, Digital Logic; pigeon-hole model, address and contents, bits bytes and words.

3. Buses

Address, data and control buses. Basic data transfer.

4. Inside the CPU

Simple examples of instructions. The fetch-execute cycle and the program counter. Registers. ALU. Control unit. Implementing a machine code in hardware. Digital logic.

5. An example CPU example: Some machine codes and mnemonics

Addressing modes. Assembly code.

6. Executing high-level software

Machine-code equivalents of high-level constructs. Function calls. Stack frames and local variables.

7. I/O

Reading and writing data. Interrupts. Transferring large amounts of data; DMA, block I/O.

8. Exercises

Use a CPU simulator to watch instruction execution. Assembly language comprehension (probably, but not necessarily, by writing a program).

9. Unix at the command line

An introduction to the alternative Unix shells. Shell built-in commands and commonly used external commands and editors.

10. Shell Script programming The programming language provided by a selected Unix shell in common usage.

11. Tools of the Unix Environment

Purpose and usage of Unix environment tools such as sed, sort, uniq, awk, grep and so on.

12. Basic Concepts of "C"

History of the C language, philosophical differences between C language design and Java. Basic form of a C program compared with that of a Java program. Using the compiler.

13. Control Structures Sequence, branching and iteration in C compared with that of Java.

14. Basic Data Structures

Review of basic data types and operators in C.

15. Functions

Discussion of ways in which functions are implemented, and used in C, including parameter passing mechanisms. Input/Output.

16. Composite Data Structures

A first discussion of Arrays in C.

17. Software Support Tools

Make, Lint, Debuggers. Libraries and library utilities.

18. C Programming Style and Portability

Language standards. Portability. Programming standards.

19. Arrays, Pointers and Functions

A discussion of pointer data types, how they relate to arrays, and how they contrast with references to Java objects.

20. Dynamic Data Structures

Implementation of various record structures and dynamic structures. Pointers. Malloc. Examples in C. Parallels will be drawn with how the internals of Java do this for you.

21. Pitfalls

Major problem areas. Design rationale of C and of Java in problem areas.

22. Further Features C preprocessor, header files, conditional inclusion, macro substitution, bitwise operators, casts, enumeration, scope, static and external declarations, separate compilation.

Reading Lists

** Recommended Text
Yale N Patt and Sanjay J Patel (2004) Introduction to Computing Systems 2nd. McGraw Hill 0072467509
Peter Prinz and Ulla Kirch-Prinz (2002) C Pocket Reference O'Reilly 0596004362
Students should await the latest publication information before purchasing texts.


This module is at CQFW Level 7