Lecturer: Mahdi Soltani
Sharif University of Technology
Department of Computer Engineering
Fundamentals of Programming (C)
Group 7
Lecture 1 Introduction and Brief History
Fundamentals of Programming (C) Group 7 Lecturer: Mahdi Soltani - - PowerPoint PPT Presentation
Fundamentals of Programming (C) Group 7 Lecturer: Mahdi Soltani Lecture 1 Introduction and Brief History Sharif University of Technology Department of Computer Engineering Introduction and Brief History Lecture 1 Outline Review of
Lecturer: Mahdi Soltani
Sharif University of Technology
Department of Computer Engineering
Group 7
Lecture 1 Introduction and Brief History
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
2/35
– Computer Components
– Programming Paradigm – Machine Languages – Assembly Languages – High-Level Languages
– Compilation Process
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
3/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
4/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
5/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
6/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
7/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
8/35
Ordered sequence of storage location (memory cell)
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
9/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
10/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
11/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
12/35
storages)
through the input unit, making it immediately available for processing when needed
be placed on output devices by the output unit
the computer’s power is turned off
(RAM)
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
13/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
14/35
the other sections
– tells the input unit when to read information into the memory unit – tells the ALU when information from the memory unit should be used in calculations – tells the output unit when to send information from the memory unit to certain output devices
perform many operations simultaneously
– A multi-core processor implements multiprocessing on a single integrated circuit chip
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
15/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
16/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
17/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
18/35
to a computer
– Very specific (one word means one thing – context free) since to 'talk' to a computer; to instruct a computer; our commands must be 100% clear and correct
two components of syntax (form) and semantics (meaning)
programming:
– Functional : tell what to do but not how (sum [1...10]) – Imperative : describing step by step – Object-Oriented and Logical Programming
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
19/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
20/35
– Example: 00010101 11010001 01001100
processor
memorize all the instructions
different type of CPU) – not portable
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
21/35
LOAD A, 9999 LOAD B, 8282 SUB B, A MOV C, A
to machine code but still quite difficult to use
machine language using assemblers
LOAD A, 9999 LOAD B, 8282 SUB B, A MOV C, A LOAD A, 9999 LOAD B, 8282 SUB B MOV C, A 0111001100 1000110011 1001111001 1100110010
Assembler
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
22/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
23/35
C C++ Java Fortran PL1 … High-Level Language Assembly Language Machine Language Hardware
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
24/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
25/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
26/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
27/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
28/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
29/35
elsewhere, such as in the standard libraries or in the private libraries
– A linker links the object code with the code for the missing functions to produce an executable image
be placed in memory
– This is done by the loader, which takes the executable image from disk and transfers it to memory – Additional components from shared libraries that support the program are also loaded
program one instruction at a time
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
30/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
31/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
32/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
33/35
https://www.onlinegdb.com/
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
34/35
Introduction and Brief History – Lecture 1
Sharif University of Technology
Department of Computer Engineering
35/35
– Hardware
Secondary storage unit
– Software
– programming paradigm: Functional, Imperative, Object-Oriented, Logical – Machine Languages: language of processor; represented by 0 and 1 – Assembly Languages: represented in words and numbers – High-Level Languages: machine independent
– Compilation Process : edit, preprocess, compile, link, load and execute