Difference Between Assembly and Machine Language
Difference Between Assembly and Machine Language
MACHINE LANGUAGE
The lowest-level programming language (except for computers that utilize programmable
microcode) Machine languages are the only languages understood by computers. While easily
understood by computers, machine languages are almost impossible for humans to use because
they consist entirely of numbers. Programmers, therefore, use either a high-level programming
language or an assembly language. An assembly language contains the same instructions as a
machine language, but the instructions and variables have names instead of being just numbers.
Programs written in high-level languages are translated into assembly language or machine
language by a compiler. Assembly language programs are translated into machine language by a
program called an assembler.
Every CPU has its own unique machine language. Programs must be rewritten or recompiled,
therefore, to run on different types of computers.
ASSEMBLY LANGUAGE
A programming language that is once removed from a computers machine language. Machine
languages consist entirely of numbers and are almost impossible for humans to read and write.
Assembly languages have the same structure and set of commands as machine languages, but
they enable a programmer to use names instead of numbers.
Each type of CPU has its own machine language and assembly language, so an assembly
language program written for one type of CPU wont run on another. In the early days of
programming, all programs were written in assembly language. Now, most programs are written
in a high-level language such as FORTRAN or C. Programmers still use assembly language when
speed is essential or when they need to perform an operation that isnt possible in a high-level
language.
You can write programs much faster in high level programming language than you can is
assembly language or machine language.
Learning and mastering a high level programming language takes less time than learning
and mestring machine language, assembly language.
High level programming language protect you from accessing all parts of a computer,
they protect you from writing a program that accidentally mess up the computer, cousing
it to crash.
Reading and modifying a program written in a high level programming language is much
easier than reading and modifying an equivalent program written in assembly language or
machine language.
Programs written in high level programming language can run on a variety of computers,
if you write a program in high level programming language, you can theoretically part
that program to run on a different computer.