An Instruction Set is all of the instructions a CPU can execute.
Instructions are stored in memory (RAM) as machine code - they are binary patterns. These are the instructions that are fetched, decoded and executed by the CPU.
Instruction Sets are linked to specific CPUs and a program written in machine code using one instruction set will not be compatible with a CPU that uses a different or updated instruction set.
Machine Code are the binary instructions that CPUs can understand.
Each instruction is a binary number that represents a specific instruction the CPU can carry out. These instructions are stored in memory before being transferred to the CPU in the Fetch Decode Execute cycles
Machine code is the lowest level language a computer can be programmed in as each instruction is directly linked to hardware and logic built into the CPU.
Advantages of Machine Code
Disadvantages of Machine Code
Due to the difficulties humans have reading and writing machine code in binary, we created Assmebly Language.
Assembly Language uses mnemonics - commonly 3 letter abbreviations of English words. Each mnemonic is directly linked to one machine code instruction.
When a program is written in Assembly Langauge, the mnemonics are converted to their binary machine code equivalents to be ran on the CPU. This translation is done by an Assembler.
Advantages of Assembly Languages
Disadvantages of Assembly Language
Over time we produced easier to use languages which are much closer to plain English, and therefore much easier to write, read and understand. We refer to these languages as being "High Level".
High level languages include: Python, JavaScript, C, C#, Swift and Java.
Each high level language uses keywords, for example: print, input, if, else, while.
Unlike a mnemonic, a keyword does not directly link to machine code and will need to be translated to machine code. When translating a keyword to a machine code instruction one keyword may produce many machine code instructions.
Due to not being linked directly to one instruction set, high level languages can be portable between different hardware configurations. For example an application written in C# can be ran on a variety of different types of CPUs and hardware platforms.
Advantages of High Level Languages
Disadvantages of High Level Languages