Why to use the assembly and why we need this course at all? How tens of programs work on one or couple of processors of your PC? It’s organized by the Operating System. Operating systems behavior cannot be understood without knowledge of computer structure and the assembly language. PCB, context switch, threads, stack, heap, dynamic linking Assembly language advantages versus High level languages The primary reason to program in assembly language is that the speed or size of a program is critically important. A hybrid approach, in which most of a program is written in a high-level language and time-critical sections are written in assembly language, builds on the strengths of both languages Cases when no high-level language or compiler is available on a particular computer Ability to exploit specialized instructions, for example, string copy or pattern-matching instructions.
Human writes the code During the course we have to go through all the levels learn each of them separately learn the translation from one to another Finally we’ll put together the learned material and get the final picture of computer organization. The abstraction of the different parts of computer hardware / software allows us to create different Levels of Representation / Interpretation. This makes easier to understand each part separately and get the whole picture putting together all components.
Instruction Set Architecture • Basic job of a CPU: execute lots of instructions. • Instructions are the primitive operations that the CPU may execute. • Different CPUs implement different sets of instructions. The set of instructions a particular CPU implements defines the Instruction Set Architecture (ISA). • Examples: Intel x86 (Pentium 4), Apple/IBM/Motorola PowerPC, MIPS, Sun Sparc, ...
Computer architecture
High and Low level languages C Program Java Program C#, .net Program C++ Program Assembly Program Assembly Program Assembly Program Sun Sparc MIPS Intel x86
Numeration systems Review Doing binary correct operations in the computer we are sure that the translated result to decimal also is correct.
Numeration systems
Numeration systems
Numeration systems
Binary system in computers
Bit patterns
Bit grouping
Conversion Example From Decimal to Binary Convert the decimal 54.4062510 to binary: