


Politecnico di Torino  
Academic Year 2017/18  
12BHDLZ, 12BHDLN, 12BHDLP, 12BHDLS, 12BHDLX, 12BHDMA, 12BHDMB, 12BHDMC, 12BHDMH, 12BHDMK, 12BHDMN, 12BHDMO, 12BHDMQ, 12BHDNL, 12BHDNM, 12BHDNX, 12BHDOA, 12BHDOD, 12BHDPC, 12BHDPI, 12BHDPL, 12BHDQR Computer science 

1st degree and Bachelorlevel of the Bologna process in Aerospace Engineering  Torino 1st degree and Bachelorlevel of the Bologna process in Automotive Engineering  Torino 1st degree and Bachelorlevel of the Bologna process in Electronic And Communications Engineering  Torino Espandi... 





Subject fundamentals
This course, mandatory for all the students, has a twofold objective: on one hand, to introduce to the student to the issues related to computer science in particular from the "cultural" standpoint, but also from the technological one. On the other hand, the course aims at teaching the use of computer programming as a way to solve realistic problems.

Expected learning outcomes
The student must acquire two fundamental types of knowledge; the solution of concrete problems through programs implemented using a programming language and to be executed on a computer; the understanding of the quantitative aspects of computer science such as performance, computational power, representation of information, computer architecture. These skills will be applied to the solution of practical problems.

Prerequisites / Assumed knowledge
No special prerequisites are expected for the course. Some basic notions of Calculus (e.g., the concept of function) and a minimal level of familiarity with the interaction with a computer.

Contents
REPRESENTATIONS OF NUMERICAL DATA (4 HRS)
Unsigned Numbers Representation intervals Operations with pure binary numbers: Addition, Subtraction, Overflow. Signed Numbers (sign and magnitude and two's complement representations) Real Numbers (Fixed and Floating Point)  Representation error in computers  Fixed and Floating point representations REPRESENTATIONS OF NONNUMERICAL DATA (2 HRS) Characters encoding (ASCII, UNICODE)  Examples of representations of other nonnumerical data BOOLEAN ALGEBRA (2 HRS] AND, OR, NOT operators and Boolean expressions  truth tables of a generic Boolean expression COMPUTER ARCHITECTURE (6 HRS) Von Neumann model (Program Memory, Control Unit, Operating Unit) CPU (execution speed) and cache PC architecture (devices and buses) Hardware and programs: assembly languages vs. high level languages SOFTWARE ARCHITECTURE [2 HRS]  Types of programming languages: machine language, assembly, highlevel languages Translating highlevel languages into binary code: compilers  The operating system PROBLEM SOLVING AND ALGORITHMS (4 HRS) Flow charts, pseudocode Problem solving and program writing C LANGUAGE [40 HRS] Data types and symbolic constants. Input/output operations (printf and scanf). ControlFlow structures (iterative and conditional). Arrays and multidimensional arrays (of integers, reals and characters). Addresses and pointers Functions and calls (by reference, by value, pointers). Strings. Command line arguments (argc and argv). Files. Struct.  concept of dynamic memory 
Delivery modes
The course includes about 20 hours of lab, in which the topics coverd in the classes will be implemented as C programs.

Texts, readings, handouts and other learning resources
 Handouts of class material.
 Paul J. Deitel  Harvey M. Deitel Il linguaggio C. Fondamenti e tecniche di Programmazione 8/Ed. con MyLab e eText ISBN 9788891901651 https://www.pearson.it/opera/pearson/06293il_linguaggio_c . 
Assessment and grading criteria
The exam consists of a written test that aims at assessing the students’ knowledge of the theoretical aspects of the course (through numerical exercises or openanswer questions) and the programming skills (through the writing on paper of a C program that implements the solution of a practical problem). The duration of the written test is 2 hours and it is a closed book test.
The maximum score for the written test is 30 cum laude. During the discussion of the score written test, a supplementary oral test can be requested at the discretion of the instructor or of the student, but only if the score of the written test is at least 18/30. The oral test covers the whole course program and is meant to assess and elaborate the student's skills. 
Notes Classes feature slide presentations. The classroom must allow the simultaneous use of the board and of the screen. 
