0% found this document useful (0 votes)
114 views

Machine Language: Alex Ostrovsky

Machine language is the lowest-level programming language understood by computers, consisting of binary digits (0s and 1s). It sits at the bottom of the hierarchy of languages, below assembly language. While impossible for humans to read, machine language is the native language of processors. Modern computers use the Von Neumann architecture, with a central processing unit that can both execute instructions and manipulate data by reading from and writing to memory. Assembly language serves as a symbolic representation of machine language instructions.

Uploaded by

Senthil Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

Machine Language: Alex Ostrovsky

Machine language is the lowest-level programming language understood by computers, consisting of binary digits (0s and 1s). It sits at the bottom of the hierarchy of languages, below assembly language. While impossible for humans to read, machine language is the native language of processors. Modern computers use the Von Neumann architecture, with a central processing unit that can both execute instructions and manipulate data by reading from and writing to memory. Assembly language serves as a symbolic representation of machine language instructions.

Uploaded by

Senthil Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Machine Language

Alex Ostrovsky

Introduction

Hierarchy of computer languages:


1. Application-Specific Language (Matlab compiler) 2. High-Level Programming language (C++, Java) 3. Assembly Language (Machine dependent) 4. Machine Language (Machine dependent)

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

History: Colossus - Visual insight

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

Every machine language must contain following commands:

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

Normally even the simplest instruction set includes:

Arithmetic operations ADD, SUB (subtract),


MUL (multiply), DIV (divide), INC (increment), DEC (decrement) Logic operations AND, OR. XOR, NOT Additional operations like SHIFT, ROTATE

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

Assembly language (cont.)

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

Simplest ALU design usually includes:

Program counter register Accumulator register Stack pointer register

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

Future of Machine Language

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

You might also like