Introduction to Programming Concepts
Introduction to Programming Concepts
memorable thing
you did over the
school break?
Introduction to Programming
Concepts
Learning Objectives
You will learn the following
• Programming languages
• Generation of programming languages
• Computer language translators
• Important terms and definition
Introduction
• A computer requires instructions to perform any task.
• These instructions are written and run in a specific sequence and are called a
computer program
Important Terms and Definitions
• Computer Program: A sequence of instructions written in a programming
language to perform a specific task.
• Programming Language: A formal language consisting of a set of
instructions that can be used to produce various kinds of output, including
software applications.
• Variables: Named storage locations in memory that hold data values.
• Control Structures: Constructs that dictate the flow of control in a program
(e.g., loops, conditionals).
• Data Types: Classifications of data items (e.g., integers, strings, booleans).
Evolution of Programming Languages
• Machine Language: The lowest-level programming language, consisting of
binary code directly understood by the computer's CPU.
• Assembly Language: A low-level language that uses symbolic representations
of machine code, making it slightly easier to write and understand. E.g instead
of 100101010 it uses words like ADD, SUB, STO
• High-Level Languages: Languages like Python, Java, and C++ that are more
abstract and closer to human languages, allowing for easier coding and
readability.
Generational Classification:
• First Generation(1GL): Machine language.
• Second Generation(2GL): Assembly language.
• Third Generation(3GL): High-level languages (e.g., C, Java).
• Fourth Generation(4GL): Languages focused on database management (e.g.,
SQL).
• Fifth Generation(5GL): Languages based on artificial intelligence (e.g.,
Prolog).
Computer Language Translators
• Compiler: A translator that converts the entire high-level program code into
machine code before execution.
• Interpreter: A translator that coverts the high-level program line-by-line(one
line at a time.
• Assembler: A translator that converts an assembly language program into
machine code.
Other important terms
• Translator – Converts instructions written in a given computer
language to another
• Source code – The text translated by a translator
• Object code – The result produced by a translator
Programming techniques
1. Modular Programming: This is a way of organizing code by breaking
it into smaller, independent pieces called modules.