Machine Language: Alex Ostrovsky
Machine Language: Alex Ostrovsky
Alex Ostrovsky
Introduction
Introduction (Cont.)
There is nothing below machine language only hardware. Machine Language is the only language understood by computers (i.e. its native to processor) Impossible for humans to read. Consists of only 0s and 1s.
0001001111110000
History
1943 Colossus Computer. Based on the same working principles as modern computers. British mathematician Max Newman was one of the main founders of Colossus.
4
Architecture
Modern computers are using Von Neumann Architecture (also called stored-program concept) It was derived by Von Neumann (obviously), John Mauchly, and Presper Eckert.
See picture on a next page for structural design of simple CPU based on Von Neumann Architecture
Requirements
Load instruction (CPU loads data directly from memory into ac register) consists of:
be loaded 0010000111100011
Operation code (opcode) Address of main memory cell from which ac register will
Opcode address
Store instruction stores computed information into a memory cell or CPU(ALU) register
Requirements
Assembly Language
To program in assembly you need to understand concepts behind machine language and execution-fetch cycle of CPU. Assembly is a mnemonic form of machine language. As noted before, assembly is a machine specific language. Although Assembly and machine language might look similar, they are in fact two different types of languages.
Assembly consists of both binary and simple words Machine code composed only of 0s and 1s
10
It is possible to code machine language directly, thus bypassing assembly instructions. This is done by replacing Assembly instructions by machine instruction numbers directly.
For example:
Instead of load instruction we might say 0004; thus load001000110001 is equal to 0004001000110001 Add might equal to 2005
Execution speed remains the same because basic instructions (like ADD, SUB, LOAD, STORE, and etc.) are hardwired into CPU.
11
ALU Registers
Memory and ALU exchange information in words. Word is a fixed chunk of data and depends on system design. Usually it is chosen so that one word fits into one memory slot.
12
Execution Process
13
With the introduction of 64-bit CPUs (Itanium, Itanium-2, AMD 64, new assembly language instructions have to be added, old ones have to be either redesigned or eliminated. This also puts stress on compiler designers as well as hardware implementation. Most recent introduction of Intels family of dual-core CPUs puts even higher demands on proper hardware and software implementation. Possibly current 16 and 32-bit instruction set will become obsolete in near future in order to avoid backward compatibility problems and minimize production costs.
14
References
courses.cs.deu.edu.tr/cse122/Machine%20Language.ppt www.cs.rpi.edu/~hollingd/cpp/lectures/Background.ppt www.cis.ksu.edu/classes/450/jason/arch_overview.ppt www.cs.kent.edu/~kschaffe/teaching/f04/chap1.ppt williams.comp.ncat.edu/COMP375/MachineLanguage.pdf www.cc.gatech.edu/classes/AY2002/cs2130_spring/cs2130pres02_m oreintrohistorycintro.ppt www2.hawaii.edu/~walbritt/ ics312/basicConcepts/lecture.ppt www.cen.uiuc.edu/~cs101/spr04/lect10.ppt cs2.cs.brown.edu/lectures/lecture8.pdf www.andrew.cmu.edu/course/ 45-870/powerpoint/45870wk2-1.ppt http://www.codesandciphers.org.uk/lorenz/colossus.htm http://www.coledd.com/electronics/cpu/arch.png http://www.fact-index.com/m/ma/machine_language.html
15
Thank You
Education is what remains after one has forgotten everything he learned in school. A. Einstein
16