I have programming background, and I recently started taking computer architecture course. Most of the lectures I see use the some sort of the layering as described in the following diagram explaining what will be covered in the course.

enter image description here

The question here is compiler (System software) takes care of converting high level/assembly code to machine code that can be understood by the processor. OS executes this code by managing the resources such as processor scheduling, memory management etc.. so what's the role of ISA layer here

  1. What is the input interface to this layer (Machine code from OS)?
  2. What is the output interface to this layer?

Image courtesy: http://theembeddedguy.com/2016/05/15/layers-of-abstraction/

  • 1
    \$\begingroup\$ That isn't really a meaningful question, just as asking what the input and output to the "algorithm" or "physics" blocks in your chart would't really be meaningful questions. \$\endgroup\$ Commented Feb 3, 2018 at 21:37
  • \$\begingroup\$ Why not :) ? That' s how any block (or) software (or) system is designed isn't it? We have to know to input specifications and output specifications to understand the system /software /layer. May be this can be rephrased as what is the role of ISA? \$\endgroup\$ Commented Feb 3, 2018 at 21:41
  • \$\begingroup\$ The ISA is somewhat more intangible than the other layers of this cake. The term "ISA" is usually associated with the idea that the instruction set is a relatively stable specification of the interface between hardware and software. The hardware microarchitecture is able to process "directly" machine code. The ISA (current popular ones are ARM and x86) defines how different microarchitectures could be compatible (ex. AMD Zen and Intel SkyLake) and different software (ex. GCC and Microsoft compilers, Linux and Windows). This is only a partial view, there are many things needed around CPUs. \$\endgroup\$
    – Grabul
    Commented Feb 3, 2018 at 23:05
  • \$\begingroup\$ You should look at examples : "ARM architecture reference manual" or "Intel 64 and IA-32 software developers manual", "Power ISA™","M68000PRM"... Imagine making a compiler targeting these instructions, imagine making a CPU implementing these instructions. \$\endgroup\$
    – Grabul
    Commented Feb 3, 2018 at 23:47
  • \$\begingroup\$ There are many ways to partition the workings of a computing system. In a way presented by theembeddedguy.com, it has full explanation of what they mean in the particular diagram. I feel that the question is inspired by goofy on-line MIT lectures that convert everything into "inputs" and "outputs". \$\endgroup\$ Commented Feb 3, 2018 at 23:53

3 Answers 3


The ISA is the level which a compiler targets (although optimisations are sensitive to the micro-architecture, particularly in terms of optimum scheduling). The ISA is a simplified but sufficient definition of the hardware interface.

The ISA describes the abstract behaviour of the underlying compute engine, and what the fundamental operations that can be encoded in machine code instructions. It will define what sort of registers the processor has, how they interact with memory, and what arithmetic operations are possible.

The ISA can also influence how easy it is to optimise the implementation (for example long pipelines, or wide issue), and may implement features which are intended to target specific high level languages (or simplify a compiler's task).

Along with the ISA, there will be architectural guarantees of ordering, exceptions, power control and access controls which also define the processor architecture. These are not relevant to a compiler (and frequently require intrinsics to access), but are critical to an OS (and sometimes applications).

Your diagram is a misleading abstraction, although each element is distinct, they don't interface to each other in the same way as a software stack would. Micro-architecture is for example influenced by feature size - both in terms of timing and costs - the gate level view is what designers think of when of when working on micro-arch).

To give a high level example of what an ISA is, consider how a fixed-length 32 bit instruction might be split up.

4 bits for instruction type (Load/Store, ALU, etc) 4 bits for instruction operation (Add/Sub, or addressing mode) 4 bits for operand 1 register 4 bits for operand 2 register 4 bits for destination register 4 bits for flow control 4 bits for constant input (e.g. operand shift) 4 more bits specific to the instruction

You would want to map these onto some superset of the functions you need for an efficient turing machine. Thus the ISA describes precisely what the machine code and assembly code represent (in a more-or-less 1:1 relation). Some instructions (NOP being the obvious example) can be achieved using a custom opcode, or a A=A|A type instruction if symmetry permits these.

In reference to the source of the diagram, in computer architecture, the micro-architecture would not generally be used to refer to the RAM, ROM and timers in a microcontroller. It would refer to how integer divide is implemented, how many instructions can execute per cycle, how many loads can be outstanding at a time - the sort of detail that is hard to observe in software at all.

  • \$\begingroup\$ At a high level, can I take ISA as a some sort of specification which helps compiler decide what sort of machine code that the compiler has to generate. OS schedules this (machine code programs) into processors which is in turn gets executed. Is my understanding correct? \$\endgroup\$ Commented Feb 3, 2018 at 23:20
  • 1
    \$\begingroup\$ No, That isn't wrong, but it's not helpful either. ALL code (os or application) is a peer at the ISA level, and is expressed identically. OS may have privilege to access memory permissions, but that is outside of the ISA. \$\endgroup\$ Commented Feb 3, 2018 at 23:37
  • 1
    \$\begingroup\$ Yes, the ISA does exactly define the hardware interface, for a subset of features (depending on the use of the term). The definition has no subtlety though, so doesn't show how to best use the hardware. \$\endgroup\$ Commented Feb 3, 2018 at 23:54
  • 1
    \$\begingroup\$ @SeanHoulihane, from philosophical standpoint, wouldn't it be true that if some fundamentals were ever established, they are not supposed to change and don't need "substantial updates"? Otherwise they wouldn't be so fundamental... \$\endgroup\$ Commented Feb 4, 2018 at 0:04
  • 1
    \$\begingroup\$ And you are also offending OP by saying "your diagram", while it was a creation of theembeddedguy.com. And it wasn't me with -1. \$\endgroup\$ Commented Feb 4, 2018 at 3:28

The chart isn't about inputs and outputs at all, so the question as phrased is meaningless.

Any given system can be described at different levels of detail, and that is what the chart is about. Each layer describes the same system, but using different terms of reference.

For example, you could describe a web server at the highest level of abstraction as a computer that accepts HTTP requests and provides the requested data, where "HTTP request" is defined in a particular standards document as a TCP/IP connection carrying data in a particular format (the next level of detail).

The same system could be described in terms of the electromagnetic fields that it receives and transmits, along with how the electrical charges move within the patterns of metal and semiconductor within it. This would be the "physics" level of abstraction. It provides a lot of detail, but it's really too much detail to be useful in terms of understanding the high-level behavior.

In computer systems, the highest levels of abstraction are defined in software. In a sense, each layer of abstraction "runs on" the virtual machine defined by the next-lower level. The ISA is the level at which the transition from software to hardware is made: the ISA defines the hardware-software interface. At this level, the "virtual machine" is very general-purpose, because in most cases, we don't want to be defining different hardware machines for different applications.

In some cases, the ISA itself is an abstraction that runs on a lower-level hardware machine. There are microcoded machines that can load different versions of microcode to impelment different ISAs. The microcode processor is made of physical registers and gates.

I'm trying to read between the lines of your question and answer a question that you didn't really ask — is any of this helping?


I think the diagram is self-explanatory. Within the context and partitioning as presented in the original theembeddedguy.com article and the "input-output" paradigm, input for the layer pictured as "ISA" is the binary code generated at "Machine-Level Code". The ISA layer fetches the binary stream and parses it in accord with inner architecture of a processor. In the particular x86 architecture, it translates complex instructions (CISC) into simpler RISC-type formats in accord with inner processor micro-architecture. This is the "output".

The entire multi-level model is just an abstraction, and is not particularly useful in real world. The boundaries can be blurry, several more abstraction layers can be introduced, in implementations some layers can be combined, etc. The entire theembeddedguy.com article is an eclectic mix of terms, that likely explains the confusion.

  • \$\begingroup\$ Wow! In less than 60 seconds I have offended someone's feeling... Care to explain what you think is wrong in my answer? \$\endgroup\$ Commented Feb 3, 2018 at 23:23
  • \$\begingroup\$ The ISA has nothing to do with instruction decoding or internal microcode. The ISA defines instructions, registers, memory models, ... \$\endgroup\$
    – Grabul
    Commented Feb 3, 2018 at 23:33
  • \$\begingroup\$ a) you insult the OP. b) the ISA is not part of a stack, it does not process (rather it informs the designer). \$\endgroup\$ Commented Feb 3, 2018 at 23:40
  • 1
    \$\begingroup\$ @TEMLIB, within the context and partitioning as presented by OP from the original article, the ISA actually performs these functions, mainly of binary decoding. We can debate about meanings and definitions, but in the context of layman explanation from theembeddedguy.com, it does what I explained. \$\endgroup\$ Commented Feb 3, 2018 at 23:41
  • 1
    \$\begingroup\$ @SeanHoulihane, yes, the original article contains a fair explanation of what the "ISA" layer means in their diagram. Did you read the article that triggered the question? \$\endgroup\$ Commented Feb 3, 2018 at 23:56

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