Programming: Hardware & Software
Programming: Hardware & Software
Hardware &
Software
COMP102 Prog. Fundamentals I: Software / Slide 2
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
COMP102 Prog. Fundamentals I: Software / Slide 3
Hardware
Memory
Input Output
Devices Devices
CPU
COMP102 Prog. Fundamentals I: Software / Slide 4
Software
System Application
Software Software
COMP102 Prog. Fundamentals I: Software / Slide 5
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)
COMP102 Prog. Fundamentals I: Software / Slide 6
Computer Hardware
COMP102 Prog. Fundamentals I: Software / Slide 8
Application Software
Operating System
Controls and manages the computing resources
Examples
Windows, Unix, MSDOS,
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
COMP102 Prog. Fundamentals I: Software / Slide 10
A sequence of instructions
An algorthm A program
(in human language) (in computer language)
An example:
Machine binary language Low-level assembly High-level
COMP102 Prog. Fundamentals I: Software / Slide 13
How to translate?
A program written in high-level programming language
(for example, C++ program)
Examples of compilers:
Microsoft Visual C++, Eclipse, g++
COMP102 Prog. Fundamentals I: Software / Slide 14
Translation System
Software Development
Major activities
Editing (writing the program)
Compiling (creates .obj file)
Linking with compiled files (creates .exe file)
– Object files Source Program
– Library modules
Compile
Loading and executing
Library routines
Testing the program Edit Link
Other object files
Think Load
Execute
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
COMP102 Prog. Fundamentals I: Software / Slide 17
Summary