1. An assembly instrction is converted into binary, also known as the machine code by the assembler. And it contains only 0s and 1s yes /no?

  2. Then, the microcode handles the 1s and 0s of the assmelby instrcution that was convereted before. Yes or no?

  3. Does the processor understand the microcode, but not the the machine code in that case?

    Assmebly(mnemonics) >Assembler(to binary)> Micorcode(binary?) >silicone 
    
  4. What is the language used to do microcoding?

  5. Where does the microcode live in the processsor ?

Edited 2 Years Ago by silvercats

For starters, please try and remember that silicon and silicone are two ver, very, very different things. Silicon is what we use in semiconductors, silicone is not :)

1: Yes.
2: Yes, more or less.
3: Machine code is what is put onto the data lines by RAM/ROM. So as a whole, yes the CPU does understand machine code. Microcode is generated internally inside the CPU, so as I said, as a whole, the CPU does understand machine code, due to the fact that the machine code is translated into microcode by the CPU itself.

4: It'd likely boil down to a piece of hardawre known as a PLA. If you're not into electronics, I'll try and explain it simply. It's basically something you can program to do certain actions really fast in only hardware, without the use of any software (eg stored in ROM etc) in the end product.
PLAs can be programmed using flowcharts or various programming langauges.

5: More often than not, in a PLA.

I'm no renowned expert in this field, I don't design CPUs, so have a read through this Wikipedia article for more detailed info.

Edited 2 Years Ago by Assembly Guy

Some machine code instructions (the simpler ones) are implemented directly in hardware. Others will invoke a microcode program which is permanently stored within the processor. That microcode program will have access to all of the processor's internal registers - not just to the ones which the assembly language programmer has access to.

Microcode programs are written in a language which is developed at the same time as the processor, and which is unique to that processor. Even processors belonging to the same family, such as the x86 processors, will all have their own unique microcode language.

At the risk of some minor thread necromancy, I would also mention that one of principles of RISC is that all (or almost all) of the instructions be simple enough to implement in hardware in a straight-forward manner, obviating the need for microcode entirely or nearly so. While this isn't terribly relevant to the dominant x86 processors, it is very relevant to CPUs in wide use for mobile and embedded systems, such as the ARM and MIPS architectures. While desktops may be almost exclusively built on the x86 processors, the installed base for ARM in particular is now far larger than any other current 32-bit or 64-bit design - nearly every smartphone uses an ARM-derived processor, as do a significant number of tablets including both the iPad and the Galaxy TAB.

Edited 2 Years Ago by Schol-R-LEA

This article has been dead for over six months. Start a new discussion instead.