Presentation is loading. Please wait.

Presentation is loading. Please wait.

COM115 Introduction to Computer Science

Similar presentations


Presentation on theme: "COM115 Introduction to Computer Science"— Presentation transcript:

1 COM115 Introduction to Computer Science
Ankara University Department of Computer Engineering

2 Introduction Computer science, seeks to build scientific foundation for topics as Computer design Computer programming Information processing Algorithmic solutions of problems Algorithmic process itself.

3 Study of Algorithms (informal) algorithm is a set of steps that defines how a task is performed. Machine-compatible representation of an algorithm is called a program. Etymology: Al-Khwarizmi (Persian astronomer, mathematician), On Calculation with Hindu Numerals. ( Long division, Euclidian for GCD, etc.

4 Euclidian algorithm One of the oldest algorithms known.
Determines the greatest common divisor (GCD) of two elements (e.g. integers) without factoring the elements. Input: A, B (two integers, B A) Output: the GCD of A and B 1. divide A by B, and call the remainder R 2. If R is not 0, then A = B, B = R and repeat 1 else return B as the GCD

5 Study of Algorithms Once an algorithm for a task is found, performing that task no longer requires understanding, only following directions. In a sense, intelligence required for the task is encoded in the algorithm.

6 Study of Algorithms Algorithms capturing and conveying intelligence allows us to build machines that display intelligent behaviour. Level of intelligence is limited by what can be conveyed through algorithms. I.e. If no algorithm exists for a task, then a machine cannot perform that task.

7 A Simple Algorithm First (known) Algorithm by
Al-Khowarismi circa AD830 Solution to 1st and 2nd Degree equations AX2 + BX = C Divide B by = D Multiply D by D = E Add E to C = F Find square root of F = G Subtract B/2 from G : this is the result

8 A Simple Algorithm (2) Example: X2 + 10X = 39 Divide 10 by 2 = 5
Multiply 5 by = 25 Add to = 64 Find square root of 64 = 8 Subtract 5 from 8 : this is the result See Article by K.Kılan, in TBD Bilişim No 80.

9 Implementing Algorithms
Algorithms can be carried out by people ... (verbal/written instructions) Or by machines (alarm clock) ... (mechanical instructions) Or by computers ... (electrical instructions) Or by biological organisms (neurons, amino acids, hormones...)

10 Data / Information Data is the raw representation of some physical quantity. Information is structured and interpreted data In computer science, algorithms use data and produce data for some end-user

11 Computer Algorithms To be able to use computers,
Algorithms and data must be coded in terms of electrical pulses (eventually). We will need to represent numbers and text data (letters,...) as electrical pulses. Results represented by the electrical pulses (inside computer) must be decoded into forms suitable for humans.

12 Computer Programs Algorithm in coded form is a computer program, or program’s code. Translation from concepts to computer internal form is done in several phases, and each involves coding with a different style: From concepts to a high level language From high level language to low level language, From low level language to machine language, From machine language to internal (voltage) form

13 Data must be represented depending on its type and usage:
Data Representation Data must be represented depending on its type and usage: Numerical data must be represented according to a number system Text data must be represented according to a standard coding table.

14 CPU (Central Processing Unit) Memory (RAM, ROM, Cache)
A Simplified Computer Logical View CPU (Central Processing Unit) Memory (RAM, ROM, Cache) Input Devices (keyboard, mouse, ...) Output Devices (Screen, printer, ...) Mass Storage Devices (disks, tapes)

15 Computer Block Diagram
Input Unit Output Memory CPU ALU Control Register Data and Address Busses

16 Terminology Algorithm Algoritma Representation Gösterim Coding Kodlama
Data (p.), Datum (s.) Veri Information Bilgi Programming language Programlama dili High-level language Yüksek (üst) düzey dil Low-level language Alt düzey dil

17 Terminology RAM (Random Access Memory) Rastgele erisimli bellek
ROM (Read Only Memory) Salt-okunur bellek Data Bus Veri (iletim) yolu Address Bus Adres (iletim) yolu Memory Bellek ALU (Arithmetic Logic Unit) Aritmetik mantık birimi Control Unit Denetim birimi Input Giris / Girdi Output Çıkıs / Çıktı Device Aygıt

18 Origins of Computing Machines
Early data storage: punched cards First used in Jacquard Loom (1801) to store patterns for weaving cloth Stored programs in Babbage’s Analytical Engine Popular through the 1970’s Early data storage: punched paper tape

19 Early computers Based on mechanical relays Based on vacuum tubes
1940: Stibitz at Bell Laboratories 1944: Mark I: Howard Aiken and IBM at Harvard Based on vacuum tubes : Atanasoff-Berry at Iowa State 1940s: Colossus: secret German code-breaker 1940s: ENIAC: Mauchly & Eckert at U. of Penn.

20 Computer Science The science of algorithms
Draws from other subjects, including Mathematics Engineering Psychology Business Administration

21 Central Questions of Computer Science
Which problems can be solved by algorithmic processes? How can discovery of algorithms be made easier? How can techniques of representing and communicating algorithms be improved? How can our knowledge of algorithms and technology be applied to provide better machines? How can characteristics of different algorithms be analyzed and compared?

22 Figure 0.5 The central role of algorithms in computer science

23 Abstraction: Definitions
Abstraction = the distinction between the external properties of an entity and the details of the entity’s internal composition. Abstract tool = a component of a larger system whose internal composition we ignore.

24 Uses of abstraction Abstraction allows us to use things we don’t fully understand. We all can use electrical devices, etc. that we either do not understand or cannot produce. Computer scientists can use algorithms implemented by others without understanding their details.

25 Outline of our study Chapter 1: Data storage
[Chapter 2: Data manipulation] Chapter 3: Operating systems Chapter 4: Networks and the internet Chapter 5: Algorithms

26 Outline of our study (continued)
Chapter 6: Programming languages Chapter 7: Software engineering Data organization Chapter 8: Data abstractions Chapter 9: Database systems Chapter 10: Artificial intelligence [Chapter 11: Theory of computation ]


Download ppt "COM115 Introduction to Computer Science"

Similar presentations


Ads by Google