Professional Documents
Culture Documents
INTRODUCTION TO COMPUTER
PROGRAMMING
OBJECTIVES
Computer Program
Programming Language
Programmer
BASIC CONCEPT
¢ Computer Program:
Ø Is a set of detailed, step-by-step instructions that
directs the computer to do what you want it to do.
Ø Another name for software
Ø Programs are written in a programming language
BASIC CONCEPT (CONT.)
¢ Computer Program:
Ø Turn data (input) into useful information (output).
Storage
BASIC CONCEPT (CONT.)
¢ Programming Language:
Ø A set of rules, words and symbols are used to write a computer
program.
Ø Provides a way of telling the computer what operations to
perform.
Ø Syntax: Rules that specify which statements (instructions) are
legal
BASIC CONCEPT (CONT.)
¢ Programmer:
Ø A person who writes programs by using programming
language.
THE LANGUAGE OF COMPUTER
High
Machine Assembly
Level
Language Language
Language
THE LANGUAGE OF COMPUTER (CONT.)
¢ Machine Language:
Ø Binary number codes understood by a specific CPU
Ø The computers only executes machine language
instructions
Ø Binary digit (bit): The digit 0 or I
Ø Binary code: A sequence of 0s and 1s
Ø Byte: A sequence of eight bit
THE LANGUAGE OF COMPUTER (CONT.)
¢ Assembly Language:
Ø Very low-level
Ø Use mnemonic codes, abbreviations to replace 0s and 1s
Ø Easier to understand
Ø Assembler: translates a program written in assembly
language into machine language
THE LANGUAGE OF COMPUTER (CONT.)
LOAD rates
MULT hours
STOR wages
THE LANGUAGE OF COMPUTER (CONT.)
¢ High Level Language:
Ø It is an English-like programming language. It is closer to
human language
Ø High-level languages include Basic, FORTRAN, COBOL,
Pascal, C++, C, and Java
Ø Interpreter: translates each statement in a high-level language
program individually into a machine language.
Ø Compiler: translates all statements in a high-level language
program as a complete unit into a machine language.
Ø The equation wages = rates x hours can be written
as follows:
wages = rate * hours;
PROCESSING A PROGRAM
Output:
PROBLEM SOLVING
¢ Input to the computer is done via an input device. Two common input
devices are the keyboard and the mouse. The computer sends its output
to an output device, such as the computer screen.