Computer programming isthe process of designing and developing
various computer programs to complete specific tasks in either
application or software or within the computers. The process
constitutes many tasks, like analyzing the problem, generating an
algorithm to solve it, and then examining the output generated.
Computer programming is creating a series of programs to resolve a
problem in a computer.
The programming also has another name called "coding" and the person
who writes the code is referred as the "Programmer" or "Coder".
Computer programming isthe
lifeblood of modern life. Imagine
for a moment what would
happen if all computers
suddenly disappeared tomorrow.
No internet. No data. No
connection. No convenience.
7.
•Over the pastfew decades, computer
programming has played an important role in the
development of the modern computer and the
information age that we live in today.
•It has allowed us to create new computer
software and systems that make many aspects of
our lives easier.
•Computer Programming allows us to create new
internet-based applications and services that make
it possible for us to communicate and collaborate
with one another like never before.
9.
Programming Methodology
A programmingmethodology is concerned with:
The analysis of a problem by developing
algorithms based on modern
programming techniques,
Designing programs in appropriate languages
and
Implementation on a suitable platform
10.
• As weknow, to communicate with a person, we need a
specific language, similarly to communicate with computers,
programmers also need a language is called Programming
language.
• A programming language is a computer language that is
used by programmers (developers) to communicate
with computers. It is a set of instructions written in any
specific language ( C, C++, Java, Python) to perform a specific
task.
A programming language is mainly used to develop
desktop applications, websites, and mobile
applications.
Programming Language
The low-level languageis a programming language that
provides no abstraction from the hardware, and it is
represented in 0 or 1 forms, which are the machine
instructions. It is very close to writing actual machine
instructions, and it deals with a computer's hardware
components and constraints.
Low-level languages come in two different categories:
Machine Language: A language that the hardware
directly interprets.
Assembly Language: A language that is perhaps more
approachable and is similar to machine language.
Low-level language
13.
Machine-level language
The machine-levellanguage is a language that consists
of a set of instructions that are in the binary form 0
or 1. As we know that computers can understand
only machine instructions, which are in binary digits,
i.e., 0 and 1, so the instructions given to the
computer can be only in binary codes.
14.
Advantages of MachineLanguage
•The machine language, does not need to be
translated since it is already written in binary, or
0s and 1s, which the computer system can read
and understand. The initial generation of
computers makes tremendous use of this
language.
•The CPU directly executes the machine
language or low-level instructions.
15.
Disadvantages of MachineLanguage
•Difficult to use -The main drawback of machine
language is how difficult it is to develop, learn, and
execute codes and algorithms.
•Time-consuming - It is pretty time-consuming to
fix flaws and mistakes in codes and programs.
•Machine dependent- The programmer has to
remember the machine code while preparing a program.
Only some people can memorize or even write the
code.
•Difficult to debug- Checking the machine
Instructions to locate the error and modifying it is very
tedious.
16.
Assembly Language
An assemblylanguage is a type of low-level
programming language that is intended to
communicate directly with a computer’s hardware.
Unlike machine language, which consists of binary and
hexadecimal characters, assembly languages are
designed to be readable by humans.
Low-level programming languages such as assembly
language are a necessary bridge between the
underlying hardware of a computer and the higher-
level programming languages—such as Python or
JavaScript—in which modern software programs are
written.
19.
High Level Language
A high-level language is 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.
20.
Advantages of ahigh-level language
•The high-level language is easy to read, write, and
maintain as it is written in English like words.
•The high-level languages are designed to overcome
the limitation of low-level language, i.e., portability.The
high-level language is portable; i.e., these languages are
machine-independent.
22.
Computer Program
Aprogram is a set of instructions following the
rules of the chosen language.
Without programs, computers are useless.
A program is like a recipe. It contains a list of
ingredients (called variables) and a list of
directions (called statements) that tell the
computer what to do with the variables.
23.
Program isin human readable form need to
convert into machine language so computer can
understand the instruction.
The conversion can be done using two ways:
◦ Compile the program (Compiler)
◦ Interpret the program(Interpreter)
24.
We generally writea computer program using a high-level
language.A high-level language is one that is understandable
by us, humans.This is called source code.
However, a computer does not understand high-level
language. It only understands the program written in 0's
and 1's in binary, called the machine code.
To convert source code into machine code, we use either
a compiler or an interpreter.
Both compilers and interpreters are used to convert a
program written in a high-level language into machine code
understood by computers. However, there are differences
between how an interpreter and a compiler works.
27.
A compiler isa special program that translates a
programming language's source code into machine
code, bytecode or another programming language.The
source code is typically written in a high-level, human-
readable language such as Java or C++.A programmer
writes the source code in a code editor or an
integrated development environment (IDE) that
includes an editor, saving the source code to one or
more text files. A compiler that supports the source
programming language reads the files, analyzes the
code, and translates it into a format suitable for the
target platform
What is a compiler?
28.
Interpreter Compiler
•Translates andexecute the
program line by line
Scans the entire program and
translates it as a whole into
machine code.
•Interpreters usually take less
amount of time to analyze the
source code. However, the overall
execution time is comparatively
slower than compilers.
•Good for fast debugging
•Execution time is more
Compilers usually take a large
amount of time to analyze the
source code. However, the overall
execution time is comparatively
faster than interpreters. Slow in
debugging. Execution time is less.
No Object Code is generated,
hence are memory efficient.
Generates Object Code which
further requires linking, hence
requires more memory.
InterpreterVs Compiler