Page 144 - PowerPoint Presentation
P. 144
CAVITE STATE UNIVERSITY
T3 CAMPUS
Department of Information Technology COSC 65 – Programming Languages
Week 2: Introduction to Programming Languages
Objective: After the completion of the chapter, students will be able to:
Describe what is a programming language
Familiarize the generations of the programming languages
Give examples of programming languages per generation
“Programming isn’t about what you
know, it’s about what you can figure
out.” – Chris Pine
Programming Language is a set of commands, instructions and other syntax use to
create a software program. Language that programmers use to write code are called “High-
level Languages.” This code can be compiled into a “-Low-level Language,” which is
recognized directly by the computer hardware.
High-level languages are designed to be easy to read and understand. This allows
programmers to write source code in a natural fashion, using logical words and symbols. For
example, reserved words like function, while, if, and else are used in most major programming
languages. Symbols like <, >, ==, and != are common operators. Many high-level languages
are similar enough that programmers can easily understand source code written in multiple
languages.
Examples of high-level languages include C++, Java, Perl, and PHP. Languages like
C++ and Java are called "compiled languages" since the source code must first be compiled
in order to run. Languages like Perl and PHP are called "interpreted languages" since the
source code can be run through an interpreter without being compiled. Generally, compiled
languages are used to create software applications, while interpreted languages are used for
running scripts, such as those used to generate content for dynamic websites.
Low-level languages include assembly and machine languages. An assembly
language contains a list of basic instructions and is much more difficult to read than a high-
level language. In rare cases, a programmer may decide to code a basic program in an
assembly language to ensure it operates as efficiently as possible. An assembler can be used
to translate the assembly code into machine code. The machine code, or machine language,
contains a series of binary codes that are understood directly by a computer's CPU. Needless
to say, machine language is not designed to be human readable.
Computer Programming Concepts
The concepts discussed on this page are essential knowledge to anyone who wants
to become skilled in computer programming. While some are not universal, these concepts
are present in the majority of computer programming languages and/or are a fundamental part
of the programming process.
Algorithm
A set of steps for carrying out a specific task. Algorithms are used extensively in
computer programming to arrive at a solution for a problem. The process of creating an
algorithm involves documenting all the necessary steps needed to arrive at the solution and
how to perform each step. A real-world example of an algorithm would be a recipe. The
instructions of a typical recipe (add ingredients, mix, stir, etc.) are an algorithm.
Source code
The actual text used to write the instructions for a computer program. This text is then
translated into something meaningful the computer can understand.
Page | 3