computer programming 1_1
DESCRIPTION
Introduction to Computer ProgrammingTRANSCRIPT
04/28/23Computer Programming 1
Introduction to algorithms and programming◦ What is an algorithm?◦ What is programming?
Programming philosophy◦ How to think of a programming problem◦ How to plan the solution to the problem
Problem decomposition Top-down refinement
04/28/23Computer Programming 2
Using an interactive development environment (IDE)
Types of programming errors◦ Syntactic◦ Semantic
structured programming language◦ What is a programming language?◦ What is a structured programming language?
04/28/23Computer Programming 3
Main language concepts covered:◦ Simple data types
Numbers (integer, real) Boolean Characters Strings
◦ Input / output statements◦ Basic statements (assignment, conditionals,
iteration/looping)
04/28/23Computer Programming 4
Understand basic components in a computer architecture
Appreciate the role of programming languages
Design a top-down solution for solving problems
Be familiar with an IDE Edit, compile, debug and run short
programs
04/28/23Computer Programming 5
Exams (50%) ◦ midterm (7th week) – 20%◦ final (end of course) – 30%
Quizzes (30%) ◦ measure progress◦ every 2 weeks
Homework (10%) … will say more Participation (10%)
◦ attendance◦ will I remember who you are?
04/28/23Computer Programming 6
Initially not programming, but thinking about programs
Small programs, 1 or more, depending on the complexity
Frequently assigned (each week)◦ Like a language, you need frequent practice
Do not wait until the last moment to work on your program
04/28/23Computer Programming 7
04/28/23Computer Programming 8
Computer ◦ one that computes (Webster’s dictionary)◦ In other languages:
French: ordinateur (from “order”) Italian: cervello elettronico (“electronic brain”) Other?
Computer: a programmable device that can store, retrieve and process data.
04/28/23Computer Programming 9
Hardware: ◦ The actual physical machine◦ Consists of several hardware devices
Software: ◦ The programs that tell the machine what to do,
i.e. give instructions to the machine◦ Different types of programs written in different
languages
04/28/23Computer Programming 10
The relationship between Hardware and Software
Hardware and software have a symbiotic relationship, this means that without software hardware is very limited; and without hardware, software wouldn’t be able to run at all. They need each other to fulfill their potential.
04/28/23Computer Programming 11
Input:◦ Keyboard◦ Mouse, Touchpad, Joystick◦ Pen & tablet, Perforated cards
Output:◦ Printer◦ Screen (monitor)◦ Teletype
Input & Output:◦ Auxiliary Devices:
disks (hard disk, floppies, DVDs/CDs, USB keys, Flash memories)
tape drives◦ Touch screen◦ Network cards (intranet, internet)
04/28/23Computer Programming 12
Memory◦ Permanent: Disks & other I/O devices ◦ Volatile: Main memory, Graphic memories◦ Virtual
Main memory is like a very large set of mailboxes, each with its own address.
It stores data encoded as binary numbers.
04/28/23Computer Programming 13
Central Processing Unit(s)◦ One or more◦ A CPU contains
Arithmetic Logic Unit (ALU) A Control Unit: controls the actions of other components
The CPU controls just about everything else by executing instructions◦ stores data in memory◦ retrieves data from memory◦ performs computations◦ sends and gets data from other devices
Not all computational systems rely on a central processing unit. An array processor or vector processor has multiple parallel computing elements, with no one unit considered the "center". In the distributed computing model, problems are solved by a distributed interconnected set of processors.
04/28/23Computer Programming 14
Bus◦ In computer architecture, a bus is a
communication system that transfers data between components inside a computer, or between computers.
◦ covers all related hardware components (wire, optical fiber, etc.) and software, including communication protocols.
04/28/23Computer Programming 15
Vacuum tubes Mainframe computers (IBM) Mini computers (DEC) Micro computers (IBM, NEC, MacIntosh)
◦ Desktops◦ Laptops◦ Blackberry
Supercomputers Tablets and smartphones
04/28/23Computer Programming 16
Every year or two computer power approximately doubles◦ Memory size (RAM)
Memory used to execute programs◦ Secondary storage (permanent storage)
E.g. disk storage, used to to hold programs and data over time
◦ Processor speeds Speed at which computers execute their programs
04/28/23Computer Programming 18
Applications:◦ Rapidly increasing hardware power allows
applications to get bigger and more complex Costs
◦ Hardware costs dropping◦ Software development costs rising
Software development complexity Programmer salaries Cost of slipping schedules
Unanticipated interactions in complex systems Unpredictability of software development times
04/28/23Computer Programming 19
http://www.webopedia.com/ http://en.wikibooks.org/wiki/A-
level_Computing/AQA/Computer_Components,_The_Stored_Program_Concept_and_the_Internet/Fundamentals_of_Computer_Systems/Hardware_and_software
04/28/23Computer Programming 20