+ All Categories
Home > Documents > 02 Software

02 Software

Date post: 03-Jun-2018
Category:
Upload: rafique512
View: 216 times
Download: 0 times
Share this document with a friend
18
Hardware & Software Programming
Transcript
Page 1: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 1/18

Hardware &

Software

Programming

Page 2: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 2/18

COMP102 Prog. Fundamentals I: Software / Slide 2

Four components of a computer system:

CPU - central processing unit

 – Makes decisions, performs computations, and

delegates input/output requests Memory: Disk Drives, CD drives, Tape drives, USB

flash drives.

 – Stores information

Input devices: Keyboard, Mouse, – Gets information from the user to the computer

Output devices: monitor

 – Sends information from computer to the user

Hardware

Page 3: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 3/18

COMP102 Prog. Fundamentals I: Software / Slide 3

Hardware

Memory

CPU

Input

Devices

Output

Devices

Page 4: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 4/18

COMP102 Prog. Fundamentals I: Software / Slide 4

SystemSoftware

 ApplicationSoftware

Software

Page 5: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 5/18

COMP102 Prog. Fundamentals I: Software / Slide 5

 Application software

Easy-to-use programs designed to perform

specific tasks

System software

Programs that support the execution and

development of other programs

Two major types –Operating systems

 –Translation systems (compilers & linkers)

Software

Page 6: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 6/18

COMP102 Prog. Fundamentals I: Software / Slide 6

Copyright © 2000 by Brooks/Cole Publishing Company

A division of International Thomson Publishing Inc.

Page 7: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 7/18

COMP102 Prog. Fundamentals I: Software / Slide 7

Computer Software Relationships 

User

Interface 

Basic Input and Output Services (BIOS) 

• needed for a computer to boot up 

User Interface  Operating System 

User Interface  Application Programs 

Computer Hardware 

Page 8: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 8/18

COMP102 Prog. Fundamentals I: Software / Slide 8

Application Software

 Application software makes computer popular and

easy to use

Common application software:

Microsoft Word, WordPerfect

PowerPoint

Netscape, Internet Explorer

PhotoShop, Photo-Paint Quick Time

Dreamweaver

Page 9: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 9/18

COMP102 Prog. Fundamentals I: Software / Slide 9

Controls and manages the computing resources

Examples Windows, Unix, MSDOS,

Important services that an operating systemprovides: Security: prevent unauthorized users from accessing

the system

Commands to manipulate the file system

Input and output on a variety of devices

Window management

Operating System

Page 10: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 10/18

COMP102 Prog. Fundamentals I: Software / Slide 10

What is a (programming) language?

 A program needs to be written in a language

There are many programming languages

Low-level, understandable by a computer

High-level, needs a translator!

C++ is a high level programming language 

A sequence of instructions

A program

(in computer language)

An algorthm

(in human language)

Page 11: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 11/18

COMP102 Prog. Fundamentals I: Software / Slide 11

Machine binary language: unintelligible

Low-level assembly language

Mnemonic names for machine operations

Explicit manipulation of memory addresses

Machine-dependent

High-level language

Readable

Machine-independent

Levels of programming language

Page 12: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 12/18

COMP102 Prog. Fundamentals I: Software / Slide 12

Machine binary language Low-level assembly High-level

An example:

Page 13: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 13/18

COMP102 Prog. Fundamentals I: Software / Slide 13

How to translate?

Examples of compilers:

Microsoft Visual C++, Eclipse, g++

A program written in high-level programming language

(for example, C++ program)

A low-level (machine language) program that is

understandable by a computer (for example, a PC)

COMPILER (for example, Visual C++)

Page 14: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 14/18

COMP102 Prog. Fundamentals I: Software / Slide 14

Translation System

Set of programs used to develop software

Types of translators:

Compiler Linker

Examples

Microsoft Visual C++, Eclipse, g++

Page 15: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 15/18

COMP102 Prog. Fundamentals I: Software / Slide 15

Software Development

Major activities

Editing (writing the program)

Compiling (creates .obj file)

Linking with compiled files (creates .exe file) – Object files

 – Library modules

Loading and executing

Testing the program

Compile

Link

Library routines

Other object files

Think

Edit

Load

Execute

Source Program

Page 16: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 16/18

COMP102 Prog. Fundamentals I: Software / Slide 16

Integrated

Development Environments

Combine all of the capabilities that a programmer

would want while developing software (VC++ 2008,

Eclipse)

Editor Compiler

Linker

Loader

Debugger

Viewer

Page 17: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 17/18

COMP102 Prog. Fundamentals I: Software / Slide 17

Our First Program

// a simple program

#include <iostream>

using namespace std;

int main() {

cout << "Hello world!" << endl;

return 0;

}

Print

statementEnds execution

of main() which ends

program

Comments

Functionnamed

main()

indicates

start of

program

Page 18: 02 Software

8/12/2019 02 Software

http://slidepdf.com/reader/full/02-software 18/18

COMP102 Prog. Fundamentals I: Software / Slide 18

Summary


Recommended