0% found this document useful (0 votes)
10 views

CUITM114 LECTURE 1 Introduction To Programming

Uploaded by

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

CUITM114 LECTURE 1 Introduction To Programming

Uploaded by

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

Introduction to Programming

What is Programming

• Computer programming is the process of designing, developing


and testing computer programs.

• A computer program is a sequence of instructions written using


a Computer Programming Language to perform a specified task
by the computer
• Program: a set of detailed and unambiguous instructions that
instructs a computer to perform a specific task, for example, to
add a set of numbers.
• Programmer: A person who specialises in designing, developing
and testing computer programs
Type of Programs
1. Off the shell/ Generic

2. Bespoke/ Tailor-made
Off- the Shelf / Generic Program
• It is a type of software that is ready-made and
available for sale to the general public .
• It is designed to provide a general set of features
that a broad range of customers will find useful.
The most popular and widely used software is
usually off-the-shelf, eg web browsers, apps and
games. Microsoft Office is a COTS product that is
a packaged software solution for businesses,
schools, university, general users etc
Bespoke Software

• These are programs specifically designed to


meet the unique needs of only one
organisation
• The organisation would employ or hire an
analyst / programmer who will first asses the
needs of the organisation before designing a
program that will solve the problems of the
organisation
Programming languages
• Are a vocabulary or set of grammatical rules
(syntax) and set of symbols for instructing a
computer to perform specific tasks.
• .Programming languages are used to create
computer programs.
Types of Programming Languages
• Low Level Languages (LLL):
• These are programming languages used to write programs
in machine code (i.e in 1s and 0s) or in mnemonic codes.
• Low level languages are machine oriented (machine
specific).
• Low level language is in two forms:

1. Machine Language and


2. Assembly Language.
Machine Language
• Is the language used to write programs in binary form
(1s and 0s)
• Machine language is the “natural language” of a
computer which it understands and as such is defined by
its hardware design.
• Machine languages are machine dependent (i.e., a
particular machine language can be used on only one
type of computer)
• However they are very difficult to learn and understand.
They are difficult to use and therefore very few
programmers use them these days.
Assembly Language
• These are programming languages that use mnemonic
codes in coding programs.
• Mnemonic codes are abbreviations used to represent
instructions when coding assembly language programs,
for example, LDA for Load, ADD for Addition, etc.
• Although these codes clearer to humans, it’s
incomprehensible to computers until translated to
machine language.
• Also programmers still have to use many instructions to
accomplish even the simplest tasks. Takes too long to
develop working programs
High level language
• These are programming languages that use English-like
statements in writing programs,
• High-level languages allow programmers to write instructions
that look almost like everyday English and contain commonly
used mathematical notations. A payroll program written in a
high-level language might contain a statement such as
grossPay = basePay + overTimePay;
Examples of HLL include C , C++, Java ,Python ,VB.net etc

• Programs written in High Level Language are first converted to


machine code before running using a compiler or an intepreter
High level language cont…..
• The process of compiling a high-level language
program into machine language can take a
considerable amount of computer time
• HLL are easier to learn and understand
• Hll are easier to debug( correct errors) and test
written programs
• Programs written using HLL are machine
independent ie the program can run on
different machines
Types of Computer code
• Source code- is the set of instructions and statements
written by a programmer using a computer programming
language. This code is later translated into machine
language by a compiler. It contains declarations,
instructions, functions, loops and other statements, which
act as instructions for the program on how to function
• Object code - is produced when an interpreter or a
compiler translates source code into recognizable and
executable machine code.Object code is a set of
instruction codes that is understood by a computer at the
lowest hardware level.( in the form of binary digits)
Types of Computer code

Source code Compiler Object code

Human readable Machine readable

• Executable code. is the fully-compiled version of the


Software program that can be executed by a computer
and used by an end user without further compilation. It
is software in a form that can be run in the computer.
They are machine code which can be directly executed
by the CPU.

You might also like