Download presentation
Presentation is loading. Please wait.
Published byJoshua Rogers Modified over 8 years ago
1
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE
3
Machine language is Numeric Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions
4
An assembly language is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions.
5
Assembly language uses a mnemonic to represent each low- level machine instruction or operation. Before it can be executed on a computer, it needs to be converted into machine language. An assembler is a program that creates object code by translating combinations of mnemonics and syntax for operations and addressing modes into their numerical equivalents.
6
A programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages. To execute a high language, it must be converted into a machine language using a compiler.
7
1 st Generation ◦ Machine Language 2 nd Generation ◦ Assembly Language 3 rd Generation ◦ High level language such as Java, Ruby
8
Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable computer programs. To “program” is to construct a program that will execute on a computer. A program is a collection of statement of 3 types: ◦ Declarative: e.g. names used to reference data ◦ Imperative: steps of the algorithm ◦ Comments: help explain the program
9
Variables and data types Assignment and statements Control structures Comments Procedures Functions
10
Variable (computer science), a symbolic name associated with a value and whose associated value may be changed. Variable types include int, float, double, char etc Int age=45;
11
The steps of the algorithm are described in the programming language using imperative statements. One form of these is the assignment statement.
12
The steps of the algorithm are described in the programming language using imperative statements. One form of these is the assignment statement.
13
They alter the execution path through the program. There are three types:
14
Comments can be incorporated within a program. They are means of explaining to someone reading or modifying the program what they program is all about. Comments need to be meaningful.
15
Comments can be incorporated within a program. They are means of explaining to someone reading or modifying the program what they program is all about. Comments need to be meaningful.
16
Procedures are a means of organizing program codes into units that can be reused Procedures do things, functions later returns things Int calc (int x, int y) Int sum=x + y; } Return sum;
17
Procedures are a means of organizing program codes into units that can be reused Procedures do things, functions later returns things Int calc (int x, int y) Int sum=x + y; } Return sum;
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.