2
$\begingroup$

Which is the lowest level of code (human written instruction for computers) in computer architecture? After doing minor research, I have come to the conclusion that, as far as determining a hierarchy in terms of the level of computer code, the following is the general level of code hierarchy: High-Level->Low-level->Assembly->Machine Code->Micro Code.

Am I correct?

If I am correct, is there a level of code below Micro code?

Is hardware control (in logical gates and transistors) code?

$\endgroup$

1 Answer 1

4
$\begingroup$

Am I correct?

Not completely

It is wrong for 2 reasons:

  1. Assembly code is just a human readable version of machine code. So the conversion process to assembly can be skipped if is not required. Unlike other codes, assembly directly corresponds to machine code. Assembly code is dependent on the Instruction Set Architecture of the machine. Converting to assembly is done by the assembler and it is optional. Machine code can be produced without the intermediate assembly code conversion step. As far as hierarchy is concerned, the assembly code and machine code are at the same level.
  2. Machine code is not at a level above Micro code for 2 reasons:
    1. Not all architectures are microcoded. So microcode is optional.
    2. Microcode is independent of the machine code. Machine code corresponds to what the machine does. Micro code corresponds to how the machine does it. Machine code corresponds to the Instruction set. Micro code corresponds to the micro architecture of the machine. 2 machines having different microcodes can utilize the same machine code if they share the same instruction set architecture. In fact, Intel corporation sometimes updates the microcode of their processors to patch up vulnerabilities. This is called microcode update. Even after the microcode is updated, the processor can still utilize the same machine code, because the microcode is independent of the machine code. Machine code is not converted to micro code. Both microcode and machine code are sequences of bits. While microcode is optional, machine code is essential.

Is there a level of code below Micro code?

No.

Is hardware control (in logical gates and transistors) code?

No. Code is a sequence of instructions. Hardware is not a sequence of instructions. Hardware is fixed. Code can be modified. Hardware control cannot be reprogrammed, software control can be reprogrammed.

$\endgroup$
1
  • $\begingroup$ Thanks a lot @Shashank V. M. $\endgroup$ Nov 5, 2020 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.