Introduction to Computer Programming
-
Upload
ishmael-mosley -
Category
Documents
-
view
39 -
download
11
description
Transcript of Introduction to Computer Programming
Introduction to Computer Programming
Lesson 1
What is a Computer System?
• A computer system is made up of two parts: Hardware and Software
• Hardware is the Physical Equipment
• Software is a collection of programs (or computer instructions) which allow the hardware to function
Hardware
• Hardware can be broken into five groups:
1 CPU (Central Processing Unit)
2 Primary Storage (or main memory)
3 Secondary Storage (such as a hard disk)
4 Input Devices (like a keyboard)
5 Output Devices (like a monitor or printer)
Software
• Software can be broken into two groups:– System Software– Application Software
Types of Computer Environments
• Personal Computer (PC)
• Timeshare
• Client/Server
What is a Computer Program?
• A computer program is generally designed to solve a problem
• A problem exists when what you have is not the same as what you want
• What you have is called DATA• What you want is called INFORMATION• A Computer Program manipulates data to
produce information
What does a Computer Programmer do?• A computer needs very simple step-by-step instructions to
function• A person can usually solve problems in quick and complex
ways• A programmer creates solutions to problems• A programmer then breaks the solution down into its simplest
steps• These steps are then translated into computer code• Creating solutions to problems, and then creating simple step-
by-step instructions for a computer based on the solutions is the job of a Computer Programmer
How are Computer Programs Created?
• The solution is translated into computer code using a text editor and a specific Computer Language
• The computer code (known as “Source Code”) is Compiled. This creates a machine language file with instructions the computer can understand (called an “Object File”)
• The Object File is then Linked and an Executable File is created, which can be run by the computer
Computer Languages
• Machine Language (true computer code)
• Symbolic Languages
• High Level Languages
• Natural Languages
Table of Computer Languages
COMPUTER LANGUAGE
WHEN INTRODUCED
EXAMPLES
Machine Language 1940s 0s and 1s only
Symbolic Language Late 1950s Assembly Language
High Level Languages
Mid to Late 1960s BASIC, Fortran, C, Pascal
Natural Languages Soon ?
Example
Print Command for
• Machine Language is 0101010001011010100001
• Symbolic Languages is “PR”
• High Level Languages “PRINT”
• Natural Languages