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

Machine Languages, Assembly Languages and Highlevel Languages Programmers

Machine languages are directly understood by computers but consist of strings of numbers that are cumbersome for humans. Assembly languages were developed using English-like abbreviations for operations and assemblers to translate them to machine language. High-level languages allow programmers to write instructions that look like everyday English and are compiled into machine language, making programming faster and easier. Common modern high-level languages include C, C++, Java, and .NET languages.

Uploaded by

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

Machine Languages, Assembly Languages and Highlevel Languages Programmers

Machine languages are directly understood by computers but consist of strings of numbers that are cumbersome for humans. Assembly languages were developed using English-like abbreviations for operations and assemblers to translate them to machine language. High-level languages allow programmers to write instructions that look like everyday English and are compiled into machine language, making programming faster and easier. Common modern high-level languages include C, C++, Java, and .NET languages.

Uploaded by

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

Machine Languages, Assembly Languages and HighLevel Languages

Programmers
write instructions in various programming languages, some directly understandable by computers
and others requiring intermediate translation steps. Hundreds of such languages are in use today.
These may be divided into three general types: 1. Machine languages 2. Assembly languages 3. High-
level languages Any computer can directly understand only its own machine language. This is the
computer’s “natural language,” defined by its hardware design. Machine languages generally consist
of strings of numbers (ultimately reduced to 1s and 0s) that instruct computers
toperformtheirmostelementaryoperationsoneatatime.Machinelanguagesaremachine
dependent(aparticularmachinelanguagecanbeusedononlyonetypeofcomputer).Such languages are
cumbersome for humans. For example, here is a section of an early machinelanguage program that
adds overtime pay to base pay and stores the result in gross pay:

Programming in machine-language was simply too slow and tedious a process for most
programmers. Instead of using the strings of numbers that computers could directly understand,
programmers began using Englishlike abbreviations to represent elementary operations. These
abbreviations formed the basis of assembly languages. Translator programs called assemblers were
developed to convert early assembly-language programs to
machinelanguageatcomputerspeeds.Thefollowingsectionofanassembly-languageprogram also adds
overtime pay to base pay and stores the result in gross pay:

Although such code is clearer to humans, it’s incomprehensible to computers until translated to
machine language. Computer usage increased rapidly with the advent of assembly languages, but
programmers still had to use many instructions to accomplish even the simplest tasks. To speed the
programming process, high-level languages were developedi n which single statementscould be
written to accomplish substantial tasks. Translator programs called compilers convert high-level
language programsinto machine language. High-level languages allow you to write instructions that
look almost like everydayEnglish and contain commonly used mathematical notations. A payroll
program written in a high-level language might contain a statement such as

From the programmer’s standpoint, high-level languages are preferable to machine and assembly
languages. C, C++, Microsoft’s .NET languages (e.g., Visual Basic, Visual C++ and C#) are among the
most widely used high-level programming languages; Java is by far the most widely used.

+1300042774 +1400593419 +1200274027

load basepay add overpay store grosspay

grossPay = basePay + overTimePay

8 Chapter 1Introduction to Computers, the Internet and the Web

Compilingahigh-
levellanguageprogramintomachinelanguagecantakeaconsiderableamountofcomputertime.Interprete
rprogramsweredevelopedtoexecutehigh-level
languageprogramsdirectly(withoutthedelayofcompilation),althoughslowerthancompiled programs
run. We’ll say more about how interpreters work in Section 1.13, where you’ll learn thatJava uses a
clever mixture of compilation and interpretation to ultimately run programs. Exercises 6.30–6.32(in
the Special Section: Building Your Own Computer) guide you through the process of building an
interpreter program. 1.8History of C and C++ Java evolved from C++, which evolved from C, which
evolved from BCPL and B. BCPL was developed in 1967 by Martin Richards as a language for writing
operating-systems software and compilers. Ken Thompson modeled many features in his language B
after theircounterpartsinBCPL,usingBtocreateearlyversionsoftheUNIXoperatingsystem at Bell
Laboratories in 1970. C—originally implemented in 1972—was evolved from B by Dennis Ritchie at
Bell Laboratories. It initially became widely known as the UNIX operating system’s
developmentlanguage.Today,mostofthecodeforgeneral-purposeoperatingsystems(e.g.,those found
in notebooks, desktops, workstations and small servers) is written in C or C++. C+
+,anextensionofC,wasdevelopedbyBjarneStroustrupintheearly1980satBell Laboratories. C++
provides a number of features that “spruce up” the C language, but
moreimportant,itprovidescapabilitiesforobject-orientedprogramming(discussedinmore detail in
Section1.16 and throughout this book). C++ is a hybrid language—it’s possible to program in either a
C-like style, an object-oriented style or both. Building software quickly, correctly and economically
remains an elusive goal at a
timewhendemandsfornewandmorepowerfulsoftwarearesoaring.Objects,ormoreprecisely—
aswe’llseeinSection1.16—theclassesobjectscomefrom,areessentiallyreusable software components.
There are date objects, time objects, audio objects, video objects, automobileobjects,peopleobjects
andsoon.In fact, almostany noun can be represented as a software object in terms of attributes (e.g.,
name, color and size) and behaviors (e.g., calculating, moving and communicating). Software
developers are discovering that using a modular, object-oriented design and implementation
approach can make softwaredevelopment groups much more productive than was possible with
earlier popular techniques like structured programming. Object-oriented programs are often easier
to understand, correct and modify. Java is the world’s most widely used object-oriented
programming language.

You might also like