Uploaded by Leara Macaraig

CP - MOD 1

advertisement
Introduction to Programming
Intended Learning Outcome
• To understand concept of computer programming.
• To identify the different programming languages and
interpreters
What is Computer Programming?
• Programming or Computer programming is a way of
giving an instruction to a computer to perform a specific
task. In programming world, it often refer to as coding.
• A sequence of instruction that a computer is executing is
called computer program. A set of computer programs can
create a software.
• Computer in this course will not just be desktop and
laptop, but all devices capable of running computer
programs
The Language of Computer
• Computer systems is made of electronic devices which operates
from 0v to 5v. In computer design these voltages are divided into
two states, which is the High and Low. High corresponds to
ranges close to 5v while the Low corresponds to the voltages near
0v or ground. These states are converted into a number system
called binary. Thus the computer/machine language are a series
of binary digits (Bits) of 1 and 0.
• Since, it would be hard for human to give instruction to computer
system using the machine language. The computer programming
was developed which is base in human natural language.
Programming Languages
• Low-Level Languages - It has no abstraction and the programming
rely closely to the computer architecture. To create a program using a
low level language, the programmer must understand the architecture
of the computer system such as the number of registers, the size of
memory, register and cache, how the device are connected to each
other, how many instruction the machine is capable and what are
these instructions.
• Low level program codes are divided into two parts. the opcode and
the operand.
High- Level Languages
• It has a high-level of abstraction and focus mainly on the
programming logic rather than the underlying hardware
architecture. It is more user friendly and generally
independent from the computer hardware.
Interpreters
.
An interpreter is a computer program that executes instructions written in a programming or scripting
language directly, without previously needing them to be translated into a machine language
program. An interpreter usually employs one of the following program execution strategies:
Compilers
• The compiler is a computer program that converts
machine code written in one programming language
(source language) into another language (target
language). The term "compiler" is generally used by
applications that convert source code from a high-level
programming language to a lower-level language (e.g.
assembly language, object code, or computer code) to
construct an executable application.
The most common language we used usually uses
compilers are:
•C
• C++
• Java
• Visual Basic
• THANK YOU
Download