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

Programming Language Instruction Set Architecture Machine Language

The document discusses low-level and high-level computer languages. Low-level languages like machine code and assembly language provide little abstraction from hardware and allow for fast execution. High-level languages like C++, Visual Basic, and Java provide more abstraction and are easier for humans to use but execute more slowly. They summarize key differences between low and high-level languages.
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)
46 views

Programming Language Instruction Set Architecture Machine Language

The document discusses low-level and high-level computer languages. Low-level languages like machine code and assembly language provide little abstraction from hardware and allow for fast execution. High-level languages like C++, Visual Basic, and Java provide more abstraction and are easier for humans to use but execute more slowly. They summarize key differences between low and high-level languages.
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/ 9

1.

Introduction
A computer languages are the languages by which a user command a computer to work on the
algorithm which a user has written to get an output. Computer language can be a high level
language ex. java, low level language machine language or any scripting language like java
script or any markup language like HTML.computer language includes wide variety of languages
used to communicate with computers.

There are mainly two types of computer languages-

 Low-level languages

 High-level languages

2. LOW-LEVEL LANGUAGES

A low-level programming language is a programming language that provides little or no


abstraction from a computer's instruction set architecture. The word "low" refers to the small or
nonexistent amount of abstraction between the language and machine language; because of this,
low-level languages are sometimes described as being "close to the hardware."

Low-level languages can be converted to machine code without using a compiler or interpreter,
and the resulting code runs directly on the processor. A program written in a low-level language
can be made to run very fast, and with a very small memory footprint; an equivalent program in
a high-level language will be more heavyweight. Low-level languages are simple, but are
considered difficult to use, due to the numerous technical details which must be remembered.

Characteristics

 Direct memory management


 Little-to-no abstraction from the hardware
 Register access
 Statements usually have an obvious correspondence with clock cycles
 Superb performance

By comparison, a high-level programming language isolates the execution semantics of a


computer architecture from the specification of the program, which simplifies development.
 first generation

 second generation

2.1. First generation

The first-generation programming language, or 1GL, is machine code. It is the only language a
microprocessor can process directly without a previous transformation. Currently, programmers
almost never write programs directly in machine code, because it requires attention to numerous
details which a high-level language would handle automatically, and also requires memorizing or
looking up numerical codes for every instruction that is used. For this reason, second generation
programming languages provide one abstraction level on top of the machine code.

Example: A function in 32-bit x86 machine code to calculate the nth Fibonacci number:

8B542408 83FA0077 06B80000 0000C383


FA027706 B8010000 00C353BB 01000000
B9010000 008D0419 83FA0376 078BD98B
C84AEBF1 5BC3
2.2. Second generation

The second-generation programming language, or 2GL, is assembly language. It is considered a


second-generation language because while it is not a microprocessor's native language, an
assembly language programmer must still understand the microprocessor's unique architecture
(such as its registers and instructions). These simple instructions are then assembled directly into
machine code. The assembly code can also be abstracted to another layer in a similar manner as
machine code is abstracted into assembly code.

Example: The same Fibonacci number calculator as above, but in x86 assembly language
using MASM syntax:

fib:
mov edx, [esp+8]
cmp edx, 0
ja @f
mov eax, 0
ret

@@:
cmp edx, 2
ja @f
mov eax, 1
ret

@@:
push ebx
mov ebx, 1
mov ecx, 1

@@:
lea eax, [ebx+ecx]
cmp edx, 3
jbe @f
mov ebx, ecx
mov ecx, eax
dec edx
jmp @b

@@:
pop ebx
ret

Advantages
• Computational Speed is very fast.

• Directly understandable by computer.

Disadvantages
• Development of a program in machine language is very time consuming.

• Error correction is tedious process.


3. HIGH LEVEL LANGUAGES
In computing, a programming language designed to suit the requirements of the programmer; it
is independent of the internal machine code of any particular computer. High-level languages are
used to solve problems and are often described as problem-oriented languages; for
example, BASIC was designed to be easily learnt by first-time programmers;COBOL is used to
write programs solving business problems; and FORTRAN is used for programs solving
scientific and mathematical problems.

With the increasing popularity of windows-based systems, the next generation of programming
languages was designed to facilitate the development of GUI interfaces; for example, Visual
Basic wraps the BASIC language in a graphical programming environment. Support for object-
oriented programming has also become more common, for example in C++ and Java. In
contrast, low-level languages, such as assembly languages, closely reflect the machine codes of
specific computers, and are therefore described as machine-oriented languages.

Characteristics

 Interpreted
 Dynamic constructs (open classes, message-style methods, etc)
 Poor performance
 Concise code
 Flexible syntax (good for internal DSLs)
 Hybrid paradigm (object-oriented and functional)
 Fanatic community

TYPES OF HIGH LEVEL LANGUAGES

 C++

 VISUAL BASIC

 JAVA
3.1. C++
C++ is statically typed, free-form, multi-paradigm, compiled, general-purpose programming
language. It is regarded as a "middle-level" language, as it comprises a combination of both high-
level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979
at Bell Labs as an enhancement to the C language and originally named C with Classes. It was
renamed C++ in 1983.

C++ is one of the most popular programming languages ever created and its application domains
include systems software, application software, device drivers, embedded software, high-
performance server and client applications, and entertainment software such as video games.
Several groups provide both free and proprietary C++ compiler software, including the GNU
Project, Microsoft, Intel and Embarcadero Technologies. C++ has greatly influenced many other
popular programming languages, most notably C# and Java.

C++ is also used for hardware design, where design is initially described in C++, then analyzed,
architecturally constrained, and scheduled to create a register transfer level hardware description
language via high-level synthesis.

Features

 Operator and operator overloading

 Templates
 objects

 polymorphism
3.2. VISUAL BASIC

Visual Basic (VB) is the third-generation event-driven programming language and integrated
development environment (IDE) from Microsoft for its COM programming model. Visual Basic
is relatively easy to learn and use.[1][2]

Visual Basic was derived from BASIC and enables the rapid application development
(RAD) of graphical user interface (GUI) applications, access to databases using Data Access
Objects,Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and
objects. Scripting languages such as VBA and VBScript are syntactically similar to Visual Basic,
but perform differently.[3]

A programmer can put together an application using the components provided with Visual Basic
itself. Programs written in Visual Basic can also use the Windows API, but doing so requires
external function declarations.
3.3. JAVA

Java is a programming language originally developed by James Gosling at Sun


Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core
component of Sun Microsystems' Java platform. The language derives much of
its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java
applications are typically compiled to byte code (class file) that can run on any Java Virtual
Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-
based, object-oriented language that is specifically designed to have as few implementation
dependencies as possible. It is intended to let application developers "write once, run anywhere".
Java is currently one of the most popular programming languages in use, and is widely used from
application software to web applications.

The original and reference implementation Java compilers, virtual machines, and class
libraries were developed by Sun from 1995. As of May 2007, in compliance with the
specifications of the Java Community Process, Sun relicensed most of its Java technologies
under the GNU General Public License. Others have also developed alternative implementations
of these Sun technologies, such as the GNU Compiler for Java, GNU Class path, and Dalvik.
Characteristics
• Interpreted
• Dynamic constructs (open classes, message-style methods, etc)
• Poor performance
• Concise code
• Flexible syntax (good for internal DSLs)

Advantages
• These are simple to adopt due to their english like structure of statements.
• They are easy to maintain and debug.

Disadvantages
• The Program written in high level language are less efficient as they take more execution
time.
• The compiler also consumes some memory as it is required for the translation process.

You might also like