CMP 201 Class 3
CMP 201 Class 3
Machine language
Humans do not like to deal in numbers alone-they prefer
letters and words. But, strictly speaking, numbers are
what machine language is.
This lowest level of language, machine language,
represents data and program instructions as 1s and 0s
binary digits corresponding to the on and off electrical
states in the computer.
Each type of computer has its machine language. In the
early days of computing, programmers had rudimentary
systems for combining numbers to represent instructions
such as add and compare.
Primitive by today’s standards, the programs were not
convenient for people to read and use. The computer
industry quickly moved to develop assembly languages.
Assembly languages
Assembly languages are considered very low level-that is,
they are not as convenient for people to use as more
recent languages.
At the time they were developed, however, they were
considered a great leap forward. To replace the 1s and 0s
used in machine language, assembly languages use
mnemonic codes, abbreviations that are easy to
remember: A for Add, C for Compare, MP for Multiply,
STO for storing information in memory, and so on,
- Although these codes are not English words, they
are still from the standpoint of human convenience-
preferable to numbers (0s and 1s) alone.
- Furthermore, assembly languages permit the use of
names- e.g., RATE or TOTAL-for memory locations
instead of actual address numbers.
- Just like machine language, each type of computer
has its assembly language.
Types of Assembler
Assemblers generate instruction. On the basis of a
number of phases used to convert to machine code,
assemblers have two types:
1. One-Pass Assembler
These assemblers perform the whole conversion of
assembly code to machine code in one go.
2. Multi-Pass/Two-Pass Assembler
These assemblers first process the assembly code and
store values in the opcode table and symbol table. And
then in the second step, they generate the machine code
using these tables.
High-level languages
The first widespread use of high-level languages in the
early 1960s transformed programming into something
quite different from what it had been.
- Programs were written in an English-like manner,
thus making them more convenient to use.
- As a result, a programmer could accomplish more
with less effort, and programs could now direct much
more complex tasks.
- These so-called third-generation languages spurred
the great Increase in data processing that characterized
the 1960s and 1970s.
Very high-level languages
This language made a true break with the prior
generation and they are non-procedural languages.
- A procedural language tells the computer how a task
is done: Add this, compare that, do this if something is
true, and so forth-a very specific step-by-step process.
- The first three generations of languages are all
procedural. In a nonprocedural language, the concept
changes. Here, users define only what they want the
computer to do; the user does not provide the details of
just how it is to be done.
- It is a lot easier and faster just to say what you want
rather than how to get it. This leads us to the issue of
productivity, a key characteristic of fourth-generation
languages.
The term VHLL was used for scripting, such
as Perl, Python, PHP, Ruby, and Visual Basic.
Natural languages
Natural language programming is a subfield of AI that
deals with the ability of computers to understand and
process human language. It is an interdisciplinary field
that combines linguistics, computer science, and artificial
intelligence.
NLP is used in a variety of applications, including machine
translation, chatbots, and voice recognition. NLP research
is also used to develop new methods for teaching
computers to understand human language.
NLP is a complex field, and there is still much research to
be done in order to develop more effective methods for
teaching computers to understand and process human
language. However, the potential applications of NLP are
vast, and the field holds great promise for the future of
AI.
1. Natural language processing: Natural language
processing algorithms are used to process and
interpret human language.
2. Dialogue systems: Dialogue systems, or chatbots are
used to simulate human conversation, and can be
used for customer service, information retrieval, and
other tasks.
3. Virtual assistants: These assistants can perform tasks
such as scheduling appointments, sending emails,
and providing customer support.
4. Predictive analytics: is used to make predictions
about future events, trends, and behaviors.
5. Robotics: can be programmed to understand and
respond to human commands and requests. This can
be used for tasks such as manufacturing and logistics.