Levels of Abstraction


High-level programming languages offer several important benefits:

  • Improving programmer productivity,

  • Allowing the programmer to think in a more natural language, and

  • Allowing programs to be independent of the computer on which they were developed.
From a complex application to the simple instructions involves several layers of software that translate high-level operations into simple instructions. The figure shows a C program compiled into assembly language and then assembled into binary machine language.

The following levels of abstraction are used to hide the complex details of hardware/software interface. The higher the level is, the less detail it gives.

Level Virtual Machine Comments
5 High-level language Examples are C, C++, and Java.
4 Assembly language Assembly language uses short mnemonics such as ADD, SUB, and MOV that are easily translated to the machine language.
3 Operating system The low-level software which handles the interface to peripheral hardware, schedules tasks, allocates storage, and presents a default interface to the user
2 Instruction set architecture (ISA) Machine language. Each machine-language instruction is executed by several microinstructions.
1 Microarchitecture A technique for implementing the instruction set of a processor as a sequence of microcode instructions
0 Digital logic Physical machine hardware

Review: Levels of Abstraction
    Which is the correct order of abstraction starting from the most abstract to the most detailed, where (i) assembly language, (ii) instruction set architecture (ISA), (iii) microarchitecture, and (iv) operating system?

      i ⇒ iv ⇒ ii ⇒ iii
      i ⇒ iv ⇒ iii ⇒ ii
      iv ⇒ i ⇒ ii ⇒ iii
      iv ⇒ i ⇒ iii ⇒ ii
Result:        




      My wife left a note on the fridge that said, “This isn’t working.”    
      I’m not sure what she’s talking about.    
      I opened the fridge door and it’s working fine!