Programming Language Instruction Set Architecture Machine Language
Programming Language Instruction Set Architecture Machine Language
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.
Low-level languages
High-level languages
2. LOW-LEVEL LANGUAGES
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
second 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:
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.
Disadvantages
• Development of a program in machine language is very time consuming.
•
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
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
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
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.