You are on page 1of 54

LECTURE 1 :

OVERVIEW OF COMPUTERS AND PROGRAMMING

KK10103/KK14303 Programming Principles Prepared By Tan Soo Fun

Contents
1.1 Introduction 1.2 Electronic Computers Then and Now 1.3 Computers : Hardware 1.4 Computers : Software 1.5 The Software Development Method 1.6 Applying the Software Development Method CASE STUDY : CONVERTING MILES TO KILOMETERS

Learning Outcomes

Upon completion of this topic, the students should able to : Describe

basic computer systems concepts Identify the basic elements of computer hardware and software List and describe the classifications of computer languages Apply the software development method

1.1 Introduction
Bill Gates
- Born on October 28, 1955 in Seattle, Washington -Start Microsoft 1975

Source : http://www.freeinfosociety.com/article.php?id=74

1.1 Introduction
Steven Paul "Steve" Jobs
- Born February 24, 1955, San Francisco -Start Apple Inc. , 1976

1.1 Introduction
Robin Li
- Born in Yangquan, Shanxi, China -Start China's most popular search engine Baidu

1.1 Introduction

Mark Zuckerberg
- born May 14, 1984 -co-founder of Facebook

1.2 Electronic Computers Then and Now

AtanasoffBerry Computer (ABC) First Electronic Computer, 1937 John Vincent Atanasoff , Clifford Berry at Iowa State University The machine was not programmable, being designed only to solve systems of linear equations

1.2 Electronic Computers Then and Now

ENIAC (Electronic Numerical Integrator And Computer) first general-purpose electronic computer created at University of Pennsylvania, funded by United States Army designed to calculate artillery firing tables for the United States Army's Ballistic Research Laboratory

1.2 Electronic Computers Then and Now

Third Generation

IBM 7090
designed for "large-scale scientific and technological applications

PDP-8
- First successful commercial minicompute r - produced by Digital Equipment Corporation (DEC) in the 1960s

1.2 Electronic Computers Then and Now

Fourth Generation

VAX
-an instruction set architecture (ISA) -developed by Digital Equipment Corporation (DEC) in the mid-1970s

1.2 Electronic Computers Then and Now

Intel Atom processor chip

contains the full circuitry of a central processing unit in an integrated circuit whose small size and low power requirements make it suitable for use in mobile internet devices. (Intel Corporation Pressroom Photo Archives)

1.2 Electronic Computers Then and Now

Now
(a) Notebook Computer (HP Pavilion
dv5, Courtesy of Hewlett-Packard). (b) Palmtop Computer (iPhone 4G, Courtesy of Apple, Inc.) (c) Desktop Computer (iMac, Courtesy of Apple, Inc.)

1.2 Electronic Computers Then and Now

Future ??

1.2 Electronic Computers Then and Now

1.1 Electronic Computers Then and Now-Future ??

1.3 Computers : Hardware

Computers ??
a

device that can perform computations and make logical decisions billions of times faster than human beings can.

Modern Computers can be categorized (size and Performance) into :


Personal

Computers Mainframes Supercomputers

1.3 Computers : Hardware

Components of Computers

1.3 Computers : Hardware

Components of Computers (Top Level View)

1.3 Computers : Hardware

Memory

1000 Memory Cells in Main Memory

1.3 Computers : Hardware

Bytes
The

amount of storage required to store a single character

Bits
The

smallest element a computer can deal with A binary digit, a 0 or a 1

1.3 Computers : Hardware

Digits of the binary, octal, decimal and hexadecimal number system

1.3 Computers : Hardware

Converting a binary number to decimal


Question
answer

1 : 110101

: 53

Conversion of decimal to binary

Will discuss more on tutorial 1

1.3 Computers : Hardware

Main Memory
RAM (Random Access Memory) ROM (Read Only Memory) -The part of memory that permanently stores programs or data - Not Volatile Memory

-The part of main memory that temporarily stores programs, data and results -Volatile Memory -Contents that disappear when the computer is switched off

1.3 Computers : Hardware

Secondary Storage

Units such as disks or flash drives that retain data even when the power to the drive is off

Why ??

Store more information/data that will fit in memory Need permanent/semipermanent data during power loss or when computer is turned off

1.3 Computers : Hardware

File

Named collection of data stored on a disk

Directory

A list of the names of files stored on a disk

Subdirectory

A list of the names of files that relate to a particular topic

1.3 Computers : Hardware

1.3 Computers : Hardware

Central Processing Unit (CPU)


Referred to as Processor
Controls the operation of the computer

Performs the data processing functions

1.3 Computers : Hardware

Computer Networks
Local

Area Network (LAN)

Computers,

printers, scanners and storage devices connected by cable for intercommunication

1.3 Computers : Hardware

Computer Networks
Wide

Area Network (WAN)

A network

such as the Internet that connects computers and LANs over a large geographic area

1.3 Computers : Hardware

Computer Networks
World

Wide Web (WWW)

A part

of the Internet whose graphical user interface (GUI) make associated network resources easily navigate allows computer users to locate and view multimediabased documents on almost any subject over the Internetthe Internet has exploded into the worlds premier communication mechanism. Todays applications can be written to communicate among the worlds computers.

1.3 Computers : Software

Operating System
Software

that controls interaction of user and computer hardware manages allocation of computers resources

1.3 Computers : Software

1.3 Computers : Software

Bootstrap program is loaded at power-up or reboot


Typically

stored in ROM or EPROM, generally known as firmware Initializes all aspects of system Loads operating system kernel and starts execution

1.3 Computers : Software

System Calls

Command-Line Interface

GUI

1.3 Computers : Software

Software
Application Software System Software

- Software used for a specific task such as word processing, accounting , or database management

- manage and integrate a computer's capabilities, but typically do not directly apply them in the performance of tasks that benefit the use

1.3 Computers : Software

Types of Software

1.3 Computers : Software

Computer languages may be divided into three general types:

1.3 Computers : Software

Machine Language

Binary number codes understood by a specific CPU natural language of a computer and as such is defined by its hardware design Advantages : Fast Processing and response Drawbacks : machine dependent (i.e., a particular machine language can be used on only one type of computer). Such languages are cumbersome for humans, as illustrated by the following section of an early machinelanguage program that adds overtime pay to base pay and stores the result in gross pay:

+1300042774 +1400593419 +1200274027

1.3 Computers : Software

Machine Language

1.3 Computers : Software

Assembly Languages
Mnemonic

codes that correspond to machine language instructions


Translator programs called assemblers were developed to convert early assembly-language programs to machine language at computer speeds. The following section of an assembly-language program also adds overtime pay to base pay and stores the result in gross pay:

load basepay add overpay store grosspay

Although such code is clearer to humans, its incomprehensible to computers until translated to machine language.

1.3 Computers : Software

Assembly Languages

1.3 Computers : Software

High-Level Language
Machine-independent programming language that combines algebraic expressions and English symbols Translator programs called compilers convert highlevel language programs into machine language. High-level languages allow programmers to write instructions that look almost like everyday English and contain commonly used mathematical notations. A payroll program written in a high-level language might contain a statement such as

grossPay = basePay + overTimePay;

1.3 Computers : Software

High-Level Language

1.3 Computers : Software


myprog.c Entering, Translating, and Running a High-Level Language Program

myprog.obj

myprog.exe

1.3 Computers : Software

1.4 Computers : Software

Flow of Information During Program Execution

1.5 The Software Development Method

Software development Method

1.6 Applying the Software Development Method

CASE STUDY : CONVERTING MILES TO KILOMETERS


PROBLEM : Your summer surveying job requires you to study some maps that give distances in kilometers and some that use miles. You and your coworkers prefer to deal in metric measurements. Write a program that performs the necessary conversion

1.6 Applying the Software Development Method

Step 1 : Identify the system Requirements


PROBLEM :

Your summer surveying job requires you to study some maps that give distances in kilometers and some that use miles. You and your coworkers prefer to deal in metric measurements. Write a program that performs the necessary conversion

1.6 Applying the Software Development Method

Step 2 : Analysis
Problem
Problem

Input :
in miles

distance

Output : Formula

distance in kilometers
mile = 1.609 kilometers

Relevant
1

1.6 Applying the Software Development Method

Step 3 :Design
1.
2. 3.

Get the distance in miles Convert the distance to kilometers Display the distance in kilometers

1 miles = 1.609 kilometers

1.6 Applying the Software Development Method

Implementation

THE END

KK10103/KK14303

You might also like