Saturday, October 29

[EXTRA] CHAPTER 6: LANGUAGE OF THE COMPUTERS - Instruction Set Architecture (ISA)

Based on what I have introduced in the previous post, this time it will be about instruction set. If all I talked about was briefly the languages that computers use, now I will share about how it is being laid out in programs.


The high-level language is used to write out the Instruction Set Architecture (ISA). But first,

WHAT IS AN INSTRUCTION SET?

Instruction set is basically a set of commands that is to be carried out by the Central Processing Unit (CPU) of the computer in terms of machine language.

Simple instructions are made up of bit strings. Inside every instructions there are several important specifications that needs to be encoded.

1. Opcode

The first 6-bit of an instruction set is the opcode (“operation code”). It tells us what operation the CPU must carry out. Mnemonic language is used rather than hexadecimal code for simplicity and readability. 

2. Parameters

The rest of the instruction set contains parameters for the operation to work on. It can have registers, values and etc.


Now, ISA is the main interface between programming language and software with the main hardware component inside a computer. ISAs have unique assembly language that specifies how the program will run in a computer. 


WHERE INSTRUCTIONS ARE STORED?


Since instructions are sets of bit strings, there are mostly many instructions for every program and this requires some space in the memory. Inside the memory, the instructions are lined up in a consecutive manner with an address for each line of instruction. 

The relationship between CPU and Memory

Besides memory, a register also holds data temporarily. Registers can retrieve data whenever it is needed like how a memory works, though only a small volume can be stored. 

Example of instruction set:

MIPS Instruction Set

It uses 32-bit instructions which has R-Type Instructions, I-Type Instructions and J-Type Instructions. The opcode identifies the instruction which allow us to identify the instruction type.

x86 Instruction Set

It is one of the series of computer microprocessor developed by Intel for Intel 8086 CPU. It provides backward compatibility for older piece of hardware or software without the need to modify. Therefore x86 is the most prevalent ISA for desktop use. 



Glossary:

Mnemonic language: In assembly language, mnemonic is used to abbreviate various operations.
Parameters: Characteristics to customize a program.
Address: A unique number given to specify a particular set of instruction in memory.
Registers: Very small volume of memory located in the CPU itself.
Bit string: A sequence of bits that is represented by binary data. 


References:

Source 1
Source 2
Source 3

Picture credits:

https://www.eeweb.com/electronics-quiz/instruction-set-architecture
http://blog.biicode.com/bitscan-cpp-library-bit-strings/
http://math.hws.edu/javanotes/c1/s1.html


Ok so hope that summarizes what ISA is all about. Feel free to check out other topics for this syllabus! Your comments are highly welcome.

Til' next time, thanks for reading!

1 comment: