COMPUTER PROGRAMMING
BY ALINAFE MPOFU
TODAY
• Main - Evaluate Common Programming Languages
Introduction to computing
o Computer systems
o Computer programming
COMPUTER SYSTEMS
• Computer system is made up of two
major components
• Hardware (physical part)
• Software (Collection of programs
(instructions) that allow the hardware
to do its job.
COMPUTER HARDWARE
• Consists of five parts
• input devices, central processing unit
(CPU) ,primary storage, output
devices, and auxiliary storage devices.
COMPUTER SOFTWARE
• divided in to two broad categories:
• system software (manages the
computer resources)
• provides the interface between the
hardware and the users
• application software
• directly responsible for helping users
solve their problems.
PROGRAMMING…..
WHAT IS PROGRAMMING?
• the process of creating a set of instructions that tell a computer how to
perform a task.
SCENARIO
• Instruction on how to do something
ACCORDING TO SCENARIO ABOVE….
• What computers understand – machine code, numerical language (binary)
• Every instruction fed to a computer is converted to a string of ones and zeros
and then interpreted by the computer to carry out a task
• HOW ARE WE SUPPOSED TO TRANSLATE OUR INSTRUCTIONS
INTO MACHINE CODE?
- Programming languages
PROGRAMMING LANGUAGES
• A programming language is a set of rules that provide a way of telling a
computer what operations to perform
• Medium of communication between computer and the user containing words,
symbols and syntax rules
• Middleman translating program into machine code
EVOLUTION OF PROGRAMMING
LANGUAGES
• Machine Language (1st Generation Language – 1945)
• Assembly Language(2nd Generation Language – 1950s)
• High Level Language (3rd Generation Language – 1960s)
• Very High Level Language (4th Generation Language – 1970s)
• Natural Language (5th Generation Language – 1980)
MACHINE LANGUAGE (1ST GENERATION
LANGUAGE – 1945)
• The set of instruction codes, in binary, which can be directly understood by the CPU without translating the
program.
• An instruction has two parts:
• Op-Code: First part of instruction which tells the computer what function to perform.
• Operand: Second part of instruction, tells the computer where to find or store data or instructions that are to be manipulated.
• The lowest-level, programming language.
• Machine Dependent.
• Difficult to program.
• Error Prone.
• Difficult to modify.
ASSEMBLY LANGUAGE(2ND GENERATION
LANGUAGE – 1950S)
• A low-level language.
• Allows the programmer to use abbreviations or words instead of binary numbers, known as
mnemonics.
• A program called an assembler transforms assembly language into machine code.
• Readability is more than machine language.
• Easy to understand and use.
• Easy to locate and correct errors.
• Easier to modify.
ASSEMBLY LANGUAGE CONT’D
• Limitations:
• Machine dependent.
• Knowledge of hardware.
• Machine level coding.
HIGH LEVEL LANGUAGE (3RD GENERATION
LANGUAGE – 1960S)
• Closer to English but included mathematical notation
• Programs are written in source code which are translated into machine
language programs called object code (.o)
• The translation of a source code to object code is accomplished by a machine
language system called a compiler
COMMON HIGH-LEVEL LANGUAGES
•C
• C++ Object Oriented Programming
Language
• JAVA Object Oriented Programming
Language
• JavaScript
• Visual Basic
VERY HIGH LEVEL LANGUAGE (4TH
GENERATION LANGUAGE – 1970S)
• Also known as 4GL or non-procedural language.
• languages that consist of statements similar to statements in a human
language.
• Fourth generation languages are commonly used in database programming
and scripts
• examples include Perl, PHP, Python, Ruby, and SQL.
5TH GENERATION LANGUAGE – 1980
• programming languages that contain visual tools to help develop a program.
Examples of fifth generation languages include Mercury, OPS5, and Prolog
• The major fields in which the fifth generation programming language are
employed are Artificial Intelligence and Artificial Neural Networks