Machine Instruction In Computer Architecture

Machine Instruction

Machine Instruction In Computer Architecture

Definition Of Machine Instruction

In computer architecture , the machine instruction is defined as sequence of bits in binary which directs the computer processor to perform the specific operation.

In computer programming the machine instruction is a low level program instruction in binary. It is also alternately referred to as binary code or simply a machine code.

The computer processor ( CPU ) can decode and execute only low level binary code. The binary code consist of only two digits that is either 0 ( zero ) or 1 ( one ).

Machine Instructions , Machine Code

However , writing the computer program in machine code is very difficult and confusing because it only contains patterns of only binary 0 and 1.

The machine instructions can be directly decoded and executed by the computer microprocessor ( CPU ) and does not need any further processing.

The machine code does not provide any abstraction and the low level commands can be mapped to the instruction set architecture ( ISA ) of the CPU.

Types Of Programming Languages

Let us now discuss the correlation between the high level program instructions and the low level machine instructions.

The programming languages are often referred to as either high level or low level programming language. The programming language level depends upon the level of abstraction.

Low Level Program

The low level programs consist of machine instructions that can be directly executed by the computer processor. The low level program instruction does not provide any abstraction and consist of patterns of binary code ( 0 and 1 ).

The machine code is not considered to be human friendly because it is difficult to interpret the program code that just contains patterns of binary  0 and 1 .

However, the machine language programming is considered very machine friendly. Because the machine ( computer ) can directly execute the machine instructions in the fastest manner.

Types Of Programming Language

The assembly language is also considered as low level language that needs a very little processing. The low level programs can work at high speed and need little memory.

Most system software programs are developed using low level languages. The system software components are mainly used by the computer to communicate with various hardware components.

High Level Program

The high level programs are developed using a human friendly programming languages such as such as C language , C++ , Java , Python and so on.

The program code written in any high level language contains words that are similar to English language. And therefore, it becomes much easier for programmers to develop software using high level languages.

However , all high level programs are converted to machine code using a special software called compiler. The compiler converts the high level program to its equivalent low level program that can be executed by the processor.

Program Compilation Interpreter
Program Compilation

Most of the application programs are first written in any high level programming language such as C language , C++ , Java , Python and so on.

The high level program is than compiled to build platform specific an executable file ( dot exe file ). The compiled executable file is a platform dependent  program.

After compilation the high level program is converted to low level machine code. The machine code consist of set of machine instructions.

Machine Instruction Format

The machine instructions are program instructions in binary that can be directly executed by the computer processor ( CPU ).

Each machine instruction provides direction to the CPU about the operation to be performed ( Operation Code – OPCODE ) and the data or reference to the data ( address of the data – OPERAND ) .

The microprocessor design is based on its instruction set architecture ( ISA ). The instruction set architecture is a set of machine instructions that can be directly decoded and executed by the processor.

The addressing mode part of the machine instruction directs the CPU in locating the data referenced in the OPERAND.

Instruction Format 16 Bits , Instruction Register

Machine Instruction And Program compilation

Due to hardware architecture, the CPU can decode and execute only machine instructions in binary. And therefore, all high level computer are compiled to generate the low level machine code.

In binary code all program instructions are represented in binary.

Computer Program Compilation And Linking

Assembly Language

In the initial phase of the evolution of computing , the programming in binary was a very difficult task . Because it contains sequence of only 0 and 1.

Hence , a more human friendly version of the low level machine language called assembly language was introduces.

The assembly language code contains mnemonic code which is a symbolic codes for common operation codes contained in the machine instruction.

The assembly language is low level programming and an assembler is required to convert this code into executable machine code.

Assembly Language

Program Instructions In Assembly Language

Machine Language

Machine Instructions In Binary

Join The Best Seller

Computer Science Online Course

This is the most comprehensive  and unique  Computer Science  And Programming Fundamentals course Online which will give you in depth understanding of most important fundamental concepts in computer science And Programming .

Don`t copy text!