What is machine code and how do we make the leap from transistors to machine code?

605 views

What is machine code and how do we make the leap from transistors to machine code?

In: Technology

5 Answers

Anonymous 0 Comments

There’s a part deep in your CPU called the Instruction Decoder Unit. A really simplified version of job is to take apart an instruction and to open and close the various gates in the rest of the CPU in order to make it perform the instructions. The Machine Code of a given processor defines which parts of a instruction do what. You have one segment that is the “opcode” that tells the IDU which instruction it is, and how to interpret the rest of the instruction. Now, the machine code is at the electrical level. Each bit in the machine code is a high or a low value, which open or close specific logic gates in the IDU to make the instructions work. For an addition instruction, the bit pattern for the opcode will make the IDU shift the ALU (arithematic logic unit) into it’s add mode, while the bit patterns in the operands sections will open the buses to the ALU from the registers to allow the date to be read and written from them as needed.

You are viewing 1 out of 5 answers, click here to view all answers.