+ All Categories
Home > Documents > Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a...

Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a...

Date post: 04-Jan-2016
Category:
Upload: asher-lane
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
11
Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming? 5. Different languages Compiled vs. 1
Transcript
Page 1: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Ch1 Introduction to Computers and

Programming

1. History of computers (4 slides)

2. What is a computer system?

3. What is a software?

4. What is programming?

5. Different languages

6. Compiled vs. interpreted 1

Page 2: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

History of Computers

Don’t mistake computers with calculators or adding machines, who came with the Mayans, Egyptians, etc..

Computers are programmable. The first calculators were not programmable, hence not considered calculators.

2

History 1/4

Page 3: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

1854 (~150 years ago)

Pioneer of modern computer!

Babbage’s difference engine

Device to subtract adjacent values in a column of numbers. Created for engineers in charge of creating tables of logarithms and trigonometric functions.

History 2/4

3

Page 4: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

1943 (~70 years ago)

.. came Colossus

Primarily used for breaking the German codes during World War 2.

It would crack Enigma Codes (codes that were cracked by exhaustively shifting text by arbitrary amounts). For example:

‘Zsszbj zs 9599’ would be

‘Attack at 0600’

History 3/4

4

Page 5: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Finally, the von Neumann Architecture…

The von Neumann computer architecture is mostly what we still use today. The architecture separates a computer in 3 major parts: The Central Processing Unit (CPU) The computer memory The Input/Output (I/O) devices

CPU + memoryScreen=output

Speakers=output Mouse=input

Keyboard=input

?

?

Knob=input

History 4/4

5

Page 6: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Software and programming? Microsoft Word, Excel, Guitar Hero, the address book in

your cell phone, the electronic that starts a car, the avionics in an airplane… are all software that were written by people.

Programming is the act of writing logical instructions that will be executed when people use the software.

It is as difficult as learning to speak a foreign language, since the programmer is constrained to the vocabulary (specific keywords) and grammar (exact syntax) of programming.

6

Page 7: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

A computer system today

Keeping the von Neumann architecture, today’s computing systems combine both hardware and software.

Hardware (i.e. what’s hard and can break..): mouse, keyboard, monitor, hard disk, printer, CD, DVD.

Software i.e. the programs that describe the steps we want the computer to perform.

7

Page 8: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Categories of software

Software contains the instructions the CPU uses to run programs. There are several categories, including:

Operating systems (OS) – manager of the computer system as a whole

Software applications – commercial programs that have been written to solve specific problems

Language compilers - to ‘translate’ programs written by people into something understandable by the machine (sometimes not needed)

8

Page 9: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Generations of Languages used to write software

1) Machine language – also called binary language. Sequenceof 0’s and 1’s.

2) Assembly language – each line of code produces a single machine instruction (add, subtract…), see bottom of page 11.

3) High-level language – slightly closer to spoken languages.

add b,cadd a,b

a= a + b + c;

9This line does the same as the two above.

Page 10: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Finally… MATLAB

Is an interpreted language – does not require compilation, but it does have a compilation step hidden from the user.

Has an interactive environment – “In the MATLAB environment, you can develop

and execute programs that contain MATLAB commands. You can execute a MATLAB command, observe the results, and then execute another MATLAB command that interacts with the information in memory, observe its results and so on.”

10

Page 11: Ch1 Introduction to Computers and Programming 1. History of computers (4 slides) 2. What is a computer system? 3. What is a software? 4. What is programming?

Recommended