Numerical coding of data types;low level coding of symbolic instructions and numeric coding;architecture of Risc processor;compiling and assembling.Definition of the C programming language;syntax, grammar, syntactic tree, BNF, semantics; data types, variables and constants, operators and expressions, pointers, arrays, instructions, functions, structured data.
Lists:implementations and operations;iterations and recursions.
Searching and sorting algorithms. Execution costs and complexities.
Enrico Vicario, "Fondamenti di Programmazione, linguaggio c, strutture dati e algoritmi elementari, c++," Editrice Esculapio, Bologna.
The C code of several examples is available on the course web site.
Learning Objectives
Provide the base knowledge of the computer architecture and of the program execution.
The C language is presented and used. At the end of thhe course the students will be able to write programs of medium complexity. In addition, algorithms for managing basic data structures will be presented, and the algorithms for search and sorting.
Prerequisites
Interest, capacity in logil reasoning, deductive knowledge, capacity in attention and application to real problems.
Commission:
S. Berretti, P. Pala, C. Colombo, E. Vicario
Type of Assessment
Written and oral examination. For the oral examination a C program must be presented.
Course program
PART I: LOW LEVEL REPRESENTATION
Introduction to the C programming language; numerical coding of data type; low level coding of instructions in synbolic form (assembler MIPS) and numeric form (machine language MIPS); computer architecture of a Risc processor (Risc4000); assembling and compiling .
PART II: C PROGRAMMING LANGUAGE
Definition of a programming language: sintax, grammar, sinthactic tree, BNF, semanticx; C programming language: types, variables, and constant. Operator and expressions. Pointers and Array. Instructions, functions, strctured data.
PART III: ELEMENTARY DATA STRUCTURE
List: sequential representation, representation with arrays and indexes, linked representation with pointers; iteratite and recursive algorithms.
PART IV: ELEMENTARY ALGORITHMS
Execution cost and complexity; Search algorithms: sequential, binary, jump search; Sorting algorithms: sequential sort, bubble-sort, merge-sort, quicksort, heapsort. Complexity of a problem: the case of sorting.