Is it the firmware that "learns" the CPU how it should "interpret" the machine code?

I didnt find a relevant category for this question, but I try here and maybe i’m lucky.

A computer understands machine code. We can write a program that calculates 2 + 2 and give back 4. ( The program needs to be compiled first, ofcourse )

But what is it that tells a computer to do a calculation here, instead of jumping up and down? Because the same code could have a different meaning if you build the computer to “interpret” the code diffrently.

Is it the firmware that “learns” the CPU how it should “interpret” the machine code?

Mainly yes, it’s like a “translator” for the system to talk to the cpu hardware.

The cpu firmware you ask about is a micro-program usually called “microcode”. If it’s not installed with the motherboard BIOS it would be an OS specific package to be temporary installed at boot for that session only. E.g. recent fixes for Intel’s cpus were for temporary install by the OS.

Generally, the firmware for any device is an interface or a simple instruction for the host to use it. The firmware could also contain a microprogram if it need to program processing circuits in it (like a cpu).

See https://en.wikipedia.org/wiki/Microcode to start learning about microcoding. :wink:

Thumb of layers: :slight_smile:
A microcode is installed in the CPU.
A firmware is installed on the device.
A driver is installed in the OS.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.