MACHINE CODE || programming language

This lesson is all about Machine code in programming language. You can learn what is machine code, how machine code works and why human don’t use machine language .

machine code,what is machine codene code, machine code in c programming language,machine,code,how machine code works,

What is Machine Code 

Machine code, also known as machine language or object code, is the elemental language of computers.Machine language is a collection of binary digits or bits that the computer reads and interprets . machine language is the only language a computer is capable of understanding . It actually numbers and looks like a very long sequence of zeros and ones. Ultimately, the source code of every human readable programming language must be translated to machine language by a compiler or an interpreter, because binary code is the only language that computer hardware can understand. It is read by the computers central processing unit (CPU ).

You also may like - Compiler in C

Computer programs are written in one or more programming languages, like c,c++,Java or visual basic. A computer cannot directly understand the programming languages used to create computer programs, so the program code must be compiled. Once a program’s code is compiled , the computer can understand it because the program’s code is turned into machine language.

 

Machine language example -

Below is an example of machine language ( binary ) for the text “Hello World “.


  01001000 01100101    01101100    01101100   01101111   00100000  01010111   01101111   01110010   01101100   01100100

 

Why Humans Don’t Use Machine language -

While easily understood by computer, machine languages are almost impossible for humans to use because they consists 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.

Programming written in high level languages are translated into assembly language or machine language by 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, therefor, to run on different types of computer.

 

Post a Comment

0 Comments