Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>In terms of the program layers that make up cpus.</p> </blockquote> <p>There's some confusion in your terminology. A CPU is a processor, a complex circuit that is fed values that represent machine instructions and performs resulting operations that modify registers and memory; it is not made up of programming layers.</p> <blockquote> <p>c > assembly > machine code > microcode > circuits</p> </blockquote> <p>This is not an accurate/valid hierarchy. Programs written in C are translated into a lower form by a compiler; that lower form can be assembly language, but it also can be direct binary machine code, or it can be code for a virtual machine layer, such as Java's JVM. Assembly languages are close representations of machine code where instructions, registers, and memory locations are given symbolic names; they are translated by an assembler to binary code but the process is much simpler and more direct than for a compiler. Microcode is a low-level form of machine code. Machine code is not generally translated to microcode, but rather the interpreter of machine code -- the CPU -- may itself be a program written/implemented in microcode that is executed by a low-level microcode processor. Circuits are the underlying hardware stratum that perform the microcode (or machine code if there is no microcode level) operations.</p> <blockquote> <p>Where does firmware fall? Is it the machine code?</p> </blockquote> <p>Firmware is machine code/microcode in a fixed ("firm") form, residing on a ROM or EPROM or even implemented directly in circuits. It is a form of software but is distinguished in that it does not reside in (readily) modifiable memory. It is distinguished from hardware conceptually, as hardware is circuits, memory, buses, etc. that do not represent a program.</p> <blockquote> <p>Do all programs need to be compiled down into machine code, or can it stop at assembly?</p> </blockquote> <p>As noted above, assembly language is a symbolic representation of machine language; it cannot be directly processed by a CPU; it must be translated into machine language.</p> <p>More retails about all these terms and issues can of course be found in Wikipedia and other internet sources, as well as introductory programming books.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload