0% found this document useful (0 votes)
9 views18 pages

w1b Software

The document outlines the basic components of computer hardware and software, including the CPU, memory, input/output devices, and the distinction between system and application software. It explains the role of operating systems in managing resources and introduces programming languages, their levels, and the process of translating high-level languages into machine code. Additionally, it covers software development activities and the use of integrated development environments (IDEs) for programming.

Uploaded by

phucabc987
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views18 pages

w1b Software

The document outlines the basic components of computer hardware and software, including the CPU, memory, input/output devices, and the distinction between system and application software. It explains the role of operating systems in managing resources and introduces programming languages, their levels, and the process of translating high-level languages into machine code. Additionally, it covers software development activities and the use of integrated development environments (IDEs) for programming.

Uploaded by

phucabc987
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Programming

Hardware &
Software

Slide credit: HKUST-COMP102


Hardware

• 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

Memory

Input Output
Devices Devices

CPU
Software

System Application
Software Software
Software

• 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)
Copyright © 2000 by Brooks/Cole Publishing Company
A division of International Thomson Publishing Inc.
Computer Software Relationships

User Interface Application Programs

User Interface Operating System

User Basic Input and Output Services (BIOS)


Interface • needed for a computer to boot up

Computer Hardware
Application Software

• Application software makes computer popular and easy to


use
• Common application software:
Microsoft Word, WordPerfect
PowerPoint
…
Operating System

• Controls and manages the computing resources


• Examples
• Windows, Unix, MacOS,…
• Important services that an operating system provides:
• Security: prevent unauthorized users from accessing the
system
• Commands to manipulate the file system
• Input and output on a variety of devices
• Window management
What is a (programming) language?

A sequence of instructions

An algorthm A program
(in human language) (in computer 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
Levels of programming language

• 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
An example:
Machine binary language Low-level assembly High-level
How to translate?

A program written in high-level programming language


(for example, C++ program)

COMPILER (for example, Visual C++)

A low-level (machine language) program that is


understandable by a computer (for example, a PC)

Examples of compilers:
• Microsoft Visual C++, Eclipse, g++
Translation System

• Set of programs used to develop software


• Types of translators:
Compiler
Linker
• Examples
• Microsoft Visual C++, Eclipse, g++
Software Development
• Major activities
Editing (writing the program)
Compiling (creates .obj file)
Linking with compiled files (creates .exe file)
• Object files
• Library modules Source Program

Loading and executing


Compile
Testing the program
Library routines
Edit Link
Other object files
Think Load

Execute
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
Our First Program

// a simple program
#include <iostream> Comments
using namespace std;
Function int main() {
named cout << "Hello world!" << endl;
main() return 0;
indicates }
start of
program

Ends execution Print


of main() which ends statement
program

You might also like