Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Computer Languages

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 45

Introduction to ICT

Ms. Ruqiya
ruqiyaabbasi42@gmail.com
Computer Languages
 How do you think we communicate with a computer?
 A computer cannot understand any commands that you
may give in English or in any other language.
 It has its own set of instructions for communication, or
what we call computer languages.
 The user of a computer must be able to communicate with
it. That means, he must be able to give the computer
commands and understand the output that the computer
generates.
 This is possible due to the invention of computer
languages.
Cont…

 Basically, there are two main categories of


computer languages, namely Low Level Language
and High Level Language.
 Letus take a brief look at both these types of
computer languages.
What is a Programming
 Computers can do a wide variety of things because they
can be programmed. This means that computers are not
designed to do just one job, but to do any job that their
programs tell them to do.
 Programming is the art of writing computer programs
 At its core, computer programming is solving problems
 A computer program is just a collection of the instructions
necessary to solve a specific problem.
 The approach or method that is used to solve the problem
is known as an algorithm
 In general a computer program is a set of instructions that
a computer follows to perform a specific task.
What is a 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

 As we know, to communicate with a person, we


need a specific language, similarly to
communicate with computers, programmers also
need a language is called Programming language.
 Before learning the programming language, let's
understand what is language?
What is Language?

 Language is a mode of communication that is used


to share ideas, opinions with each other. For
example, if we want to teach someone, we need
a language that is understandable by both
communicators.
Computer Programming

 Computer programming is the process that professionals


use to write code that instructs how a computer,
application or software program performs. At its most
basic, computer programming is a set of instructions to
facilitate specific actions.
 If you're wondering what a computer programmer is, it's a
professional that creates instructions for a computer to
execute by writing and testing code that enables
applications and software programs to operate
successfully.
Types of programming language

There are four basic type of programming language.


 1. Low-level programming language
 2. High-level programming language
 3. Natural language
 4. Middle-level programming language
1.Low Level Languages

 Low level languages are the basic computer instructions or


better known as machine codes. A computer cannot
understand any instruction given to it by the user in
English or any other high level language. These low level
languages are very easily understandable by the machine.
 The main function of low level languages is to interact
with the hardware of the computer. They help in
operating, syncing and managing all the hardware and
system components of the computer. They handle all the
instructions which form the architecture of the hardware
systems.
Machine Language
 This is one of the most basic low level languages. The
language was first developed to interact with the first
generation computers. It is written in binary code or
machine code, which means it basically comprises of only
two digits – 1 and 0.
Cont…

 Sometimes called machine code or object


code, machine language is a collection
of binary digits or bits that the computer reads
and interprets. Machine language is the only
language a computer can understand
Machine language example

 Below is an example of machine language (binary) for the


text "Hello World.“
 01001000 01100101 01101100 01101100 01101111 00100000
01010111 01101111 01110010 01101100 01100100
 Below is another example of machine language (non-
binary), which prints the letter "A" 1000 times to the
computer screen.
 169 1 160 0 153 0 128 153 0 129 153 130 153 0 131 200 208 241
96
Assembly Language
 This is the second generation programming language. It is
a development on the machine language, where instead of
using only numbers, we use English words, names, and
symbols. It is the most basic computer language necessary
for any processor.
Cont..

 Programs written in assembly languages are compiled by


an assembler.
 Machine language is a series of numbers, which is not easy
for humans to read. Using ASM, programmers can write
human-readable programs that correspond almost exactly
to machine language.
2.High Level Language

 When we talk about high level languages, these are


programming languages. Some prominent examples are
PASCAL, FORTRAN, C++ etc.
 The important feature about such high level languages is
that they allow the programmer to write programs for all
types of computers and systems. Every instruction in high
level language is converted to machine language for the
computer to comprehend.
Procedural Programming Language

 This is a type of programming language that has well


structured steps and complex procedures within its
programming to compose a complete program.
 It has a systematic order functions and commands to
complete a task or a program. FORTRAN, C, ALGOL, BASIC,
COBOL are some examples.
Example

 #include <stdio.h>
 int main() {
printf("Hello World!");
return 0;
}
Object-Oriented Languages

 These are high level languages that focus on the ‘objects’


rather than the ‘actions’. To accomplish this, the focus
will be on data than logic.
 The reasoning behind is that the programmers really cares
about the object they wish to manipulate rather than the
logic needed to manipulate them. Some examples include
Java, C++, Python, Swift etc.
Example
 Classes and Objects
 Classesand objects are the two main aspects of
object-oriented programming.
 class
 Fruit

objects
 Apple
 Banana
 Mango
3. Natural language

 The main advantage of Natural language is a part of


human languages such as English, Russian, German, and
Japanese. It is used by machines to understand,
manipulate, and interpret human's language. It is used by
developers to perform tasks such as translation, automatic
summarization, Named Entity Recognition (NER),
relationship extraction, and topic segmentation.
 language is that it helps users to ask questions in any
subject and directly respond within seconds.
4. Middle-level programming language

 Middle-level programming language lies between the low-


level programming language and high-level programming
language. It is also known as the intermediate
programming language and pseudo-language.
 A middle-level programming language's advantages are
that it supports the features of high-level programming, it
is a user-friendly language, and closely related to machine
language and human language.
 Example: C, C++, language
Language translators

 Language translators allow computer programmers to


write sets of instructions in specific programming
languages. These instructions are converted by the
language translator into machine code.
a) compiler
b) interpreter
c) assembler
Assembler
 An assembler translates assembly language into machine
code.
 Assembly language consists of mnemonics for machine op-
codes, so assemblers perform a 1:1 translation from
mnemonic to direct instruction. For example, LDA #4
converts to 0001001000100100.
Compiler
 A compiler is a computer program that translates code
written in a high-level language into a low-level language,
machine code.
 The most common reason for translating source code is to
create an executable program (converting from high-level
language into machine language).
Interpreter
 An interpreter program executes other programs directly,
running through the program code and executing it line-
by-line.
 As it analyses every line, an interpreter is slower than
running compiled code, but it can take less time to
interpret program code than to compile and then run it.
This is very useful when prototyping and testing code.
Life cycle of program/ How program
work
Most commonly used Programming Language

 As we all know, the programming language makes our life


simpler. Currently, all sectors (like education, hospitals,
banks, automobiles, and more) completely depend upon
the programming language.
 There are dozens of programming languages used by the
industries. Some most widely used programming languages
are given below -
Python

 Python is one of the most widely used user-friendly


programming languages. It is an open-source and easy to
learn programming language developed in the 1990s. It
is mostly used in Machine learning, Artificial intelligence,
Big Data, GUI based desktop applications, and Robotics.
Java

 Java is a simple, secure, platform-independent, reliable,


architecture-neutral high-level programming
language developed by Sun Microsystems in 1995. Now,
Java is owned by Oracle. It is mainly used to develop
bank, retail, information technology, android, big data,
research community, web, and desktop applications.
C

 C is a popular, simple, and flexible general-purpose


computer programming language. Dennis M Ritchie
develops it in 1972 at AT&T. It is a combination of both
low-level programming language as well as a high-level
programming language. It is used to design applications
like Text Editors, Compilers, Network devices, and many
more.
C++

 C++ is one of the thousands of programming languages


that we use to develop software. C++ programming
language is developed by Bjarne Stroustrup in 1980. It is
similar to the C programming language but also includes
some additional features such as exception handling,
object-oriented programming, type checking, etc.
C#

 C# (pronounced as C sharp) is a modern, general-purpose,


and object-oriented programming language used
with XML based Web services on the .NET platform. It is
mainly designed to improve productivity in web
applications. It is easier to learn for those users who have
sufficient knowledge of common programming languages
like C, C++, or Java.
JavaScript

 JavaScript is a type of scripting language that is used on


both client-side as well as a server-side. It is developed in
the 1990s for the Netscape Navigator web browser. It
allows programmers to implement complex features to
make web pages alive. It helps programmers to create
dynamic websites, servers, mobile applications, animated
graphics, games, and more.
R

 Currently, R programming is one of the popular


programming languages that is used in data analytics,
scientific research, machine learning algorithms, and
statistical computing. It is developed in 1993 by Ross Ihaka
and Robert Gentleman. It helps marketers and data
scientists to easily analyze, present, and visualize data.
PHP

 PHP stands for Hypertext Pre-processor. It is an open-


source, powerful server-side scripting language mainly
used to create static as well as dynamic websites. It is
developed in 1994. Inside the php, we can also
write HTML, CSS, and JavaScript code. To save php file,
file extension .php is used.
Go

 Go or Golang is an open-source programming language. It


is used to build simple, reliable, and efficient software. It
is developed by Robert Griesemer, Rob Pike, and Ken
Thompson in 2007.
Ruby

 Ruby is an open-source, general-purpose, and pure object-


oriented programming language released in 1993. It is
used in front-end and back-end web development. It is
mainly designed to write CGI (Common Gateway Interface)
scripts.
What Do Programmers Do All Day?

 Computer programmers create instructions for a computer


to execute by writing and testing code that enables
applications and software programs to operate
successfully. Computer programmers use specialized
languages to communicate with computers, applications
and other systems to get computers and computer
networks to perform a set of specific tasks. Languages like
C++, Java, Python and more allow programmers – often
working closely with software developers and engineers to
build programs that allow “search, surfing and selfies,”.
TASK

 Q) A program is a sequence of ________ written in


a programming language.
a) Lines
b) functions
c) Instructions
d) codeword
 Q) Types of computer language translator are?

a) compilers
b) interpreters
c) assemblers
d) all of these
 Q) A computer software that transforms assembly
language to machine language is known as a
________.
a) compiler
b) interpreter
c) assembler
d) none of these
Q) The symbols used in an assembly language are
a) Codes
b) Mnemonics
c) assembler
d) all of the above
Q) A language which is close to that used within the
computer is–
a) high level language
b) assembly language
c) low level language
d) all of the above

You might also like