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

Comprog Lesson 1

Computer programming involves writing instructions for a computer in a programming language. It is defined as the art and science of designing programs. There are different categories of programming languages including machine language, low-level languages, high-level languages, and assembly language. Programmers must understand computer architecture and how to solve problems through programming.

Uploaded by

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

Comprog Lesson 1

Computer programming involves writing instructions for a computer in a programming language. It is defined as the art and science of designing programs. There are different categories of programming languages including machine language, low-level languages, high-level languages, and assembly language. Programmers must understand computer architecture and how to solve problems through programming.

Uploaded by

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

LESSON 1:

Basic Programming Concepts


LYKA D.L SAN PEDRO/ROBETHEL ANDRES
What is Computer Programming?
• A computer program is a set of instructions written in a
programming language that a computer can execute. Computer
programs are designed to perform specific tasks. Programmers write
these programs refers to the person who plans or creates, codes, tests,
debugs, and documents a computer program. Programming requires
more than just the knowledge of a programming language. In effect,
programmers spend most of their time in planning solutions before
they start writing the source code for the program.
Computer Programming
• Computer programming is defined as the art and science of designing
a program. Programming is the process of providing instructions for
the microprocessor.
• Computer programming is an evolving process of designing and
constructing executable computer programs to achieve a specific
computing result.
Categories of Programming Languages
• Machine Language - The native tongue of a computer is
the machine language. Each machine language instruction
directs a binary string of 0’s and 1’s that stipulates an
operation and classifies the memory cells involved in the
process.
Categories of Programming Languages
• Machine Language

Example:
SUB AX, BX = 00001011 00000001 00100010, is an instruction set to
subtract the values of two registers AX and BX.

A computer programmer must have knowledge about the architecture of the


particular machine before programming in machine language. Developing programs
using machine language is a tedious job. It is challenging to recall the arrangement of
binary numbers for different computer architecture. Therefore, it is not much in
practice.
Categories of Programming Languages
• Low-Level Language- A programming language that runs a
little abstraction from a computer's instruction set
architecture. The word " low " states to the small or
nonexistent volume of abstraction among the language and
machine language. Because of this, lowlevel languages are
sometimes labeled as being " close to the hardware.“
• Low-level language does not essentially need the compiler or
an interpreter to run. The computer processor in a
programming language is written in a suitable to run the code
without using either of these.
Categories of Programming Languages
• Advantages of Low-level languages
❖ Programs in a computer established using a low-level language is
fast and memory efficient.
❖ Programmers can apply processor and memory in an okay way
using a lowlevel language.
❖ Computer programs do not need any compiler or interpreters just
to translate the source code to machine code. Therefore, it cuts the
compilation and interpretation time.
❖ Low-level languages offer direct manipulation of computer
registers and storage.
❖ It can directly communicate with hardware devices.
Categories of Programming Languages
• Disadvantages of Low-level languages
❖ Programs developed using a low-level language are computer
machine dependent and not portable.
❖ It is challenging to develop, debug, and maintain.
❖ Low-level programs are more error-prone.
❖ Low-level programming typically results in faulty programming
output.
❖ The programmer must have additional knowledge of the computer
architecture of a particular machine, for programming in a low-
level language.
Categories of Programming Languages
• High-level languages- The computer would have no difficulty
understanding the machine language instructions, but the
typical programmer will never be able to read or understands
it. To create a program that can be understood is easily by
programmers, language designers (the one who designs
programming languages) and other language implementers (a
person or group of people who develops computer
programming languages) set high-level languages that enable
the standard programmer to write computer programs using
instructions that resemble everyday language.
Categories of Programming Languages
• Advantages of High-level languages
❖ Programs in a computer established using a low-level language is
fast and memory efficient.
❖ Programmers can apply processor and memory in an okay way
using a low level language.
❖ Computer programs do not need any compiler or interpreters just
to translate the source code to machine code. Therefore, it cuts the
compilation and interpretation time.
❖ Low-level languages offer direct manipulation of computer
registers and storage.
❖ It can directly communicate with hardware devices.
Categories of Programming Languages
• Disadvantages of High-level languages
❖ It takes additional translation times to translate the source to
machine code.
❖ High-level programs are comparatively slower than low-level
programs.
❖ Compared to low-level programs, they are generally less memory
efficient.
❖ It cannot communicate directly with the hardware.
Examples of Programming Languages
LANGUAGE DESCRIPTION
Ada was developed in the 1970s, primarily for applications

ADA used by the U.S. Department of Defense. This computer


language is named honor of the “Countess Ada Lovelace" it is
a meaningful and vital historical symbol in computing.

Beginners All-purpose Symbolic Instruction Code is a

BASIC general purposelanguage initially an outline designed in the


early 1960s to be straightforward adequate for beginners to
gain knowledge. Nowadays, there are many different
versions of BASIC.

FORTRAN
FORmula TRANslator was the first highlevel
programming language. It was originally developed in
the 1950s to carry out complex arithmetic or
mathematical calculations.
Examples of Programming Languages
LANGUAGE DESCRIPTION

Common Business-Oriented Language was developed


COBOL in the 1950s and was designed for business
applications.
Pascal was created in 1970 and was initially designed
PASCAL for teaching computer programming. The language was
named under the mathematician, physicist, and
philosopher Blaise Pascal.

C and C++ (it is pronounced as a "c plus plus"), and it is


C & C++ a powerful, general purpose computer language
developed at the Bell Laboratories. The C language was
developed in 1972, and the C++ language was
developed in 1983.
Examples of Programming Languages
LANGUAGE DESCRIPTION

Pronounced “c sharp. “This language was created by


C# Microsoft around 2000 for developing applications
based on the Microsoft.NET platform.
Java was created and developed by the Sun
JAVA Microsystems in the early 1990s. It can develop
programs that run on a single computer or over the
Internet from a Web server.

JavaScript, crated in the 1990s, can be used in Web


JavaScript pages. Regardless of its name, JavaScript is not related
to Java.
Examples of Programming Languages
LANGUAGE DESCRIPTION

Python is a general-purpose language developed in the


PYTHON 1990s. It has gotten become widely famous in business
or in e-commerce and an academic application.
Ruby is a general-purpose language that was developed
RUBY in the 1990s. It is gradually becoming a famous
language for programs that run on Web servers

Visual Basic (commonly known as VB) is a Microsoft


VISUAL BASIC programming language that allows computer
programmers to create Windows-based applications
quickly. VB was initially created in the early 1990s
ASSEMBLY LANGUAGE
• This is a type of a low-level programming language in which each
program statement corresponds to an instruction that the
microprocessor can carry out. Assembly language is thus specific
to a given processor. After writing an assembly language
program, the programmer must use an assembler particular to
the processor to interpret the assembly language into machine
code. An assembly language provides precise control of the
computer, but assembly language programs written for one
computer type must be rewritten to operate on other classes.
ASSEMBLY LANGUAGE
• An assembly language might be used instead of a high –level
language for any of these three primary reasons; speed, control,
and preference. The program written in assembly language run
faster than those generated by a compiler. The use of an assembly
language allows the programmer to interact directly with the
hardware, including the processor, memory display, input/output
ports.
ASSEMBLY LANGUAGE
• A high-level programming language separates the execution of
computer architecture from the requirement of the program. It
makes the process of developing a computer program much
simpler and more understandable.
ASSEMBLY LANGUAGE
• A high-level programming language separates the execution of
computer architecture from the requirement of the program. It
makes the process of developing a computer program much
simpler and more understandable.
ADVANTAGES OF ASSEMBLY LANGUAGE
• It allows more intricate jobs to run in a manageable way.
• It is memory efficient, which needs less computer memory.
• It is faster as its execution time is less.
• It is a hardware-oriented.
• It only requires less instruction to get the result.
• It is used for critical jobs.
• It is not required to keep track of memory locations.
• It is a low-level embedded system.
DISADVANTAGES OF ASSEMBLY LANGUAGE
• It takes more time and effort to write the code for the same.
• It is very complex and challenging to understand.
• The syntax is difficult to remember.
• It has a lack of portability computer programs among different
computer architectures.
• It needs more size or memory of the computer to run the
extended programs written in Assembly Language.
THANK YOU!
See you next week! ☺

You might also like