1 Machine Language Alex Ostrovsky. 2 Introduction Hierarchy of computer languages: 1. Application-Specific Language (Matlab compiler) 2. High-Level Programming.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Chapter 8: Central Processing Unit
Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
Instruction Set Architecture
CompSci A Peek at the Lower Levels  It is good to have a sense of what happens at the hardware level  Not required for this course  It may.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 1: Bits, bytes and a simple processor dr.ir. A.C. Verschueren.
Instruction Set Architecture & Design
TK 2633 Microprocessor & Interfacing
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
Stored Program Concept: The Hardware View
Chapter 2.2 Machine Language.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Basic Computer Organization Background for CS260.
Implementation of a Stored Program Computer
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
Computer Structure.
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
Processor Structure & Operations of an Accumulator Machine
The CPU The Central Presentation Unit Main Memory and Addresses Address bus and Address Space Data Bus Control Bus The Instructions set Mnemonics Opcodes.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Introduction to Computer Architecture and System
Computer Science 210 Computer Organization The von Neumann Architecture.
Cosc 2150: Computer Organization
Computer Systems Organization CS 1428 Foundations of Computer Science.
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
The Central Processing Unit (CPU) and the Machine Cycle.
Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions.
Computer Architecture And Organization UNIT-II General System Architecture.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
1.4 Representation of data in computer systems Instructions.
Overview von Neumann Architecture Computer component Computer function
Von Neumann Computers Article Authors: Rudolf Eigenman & David Lilja
CompSci Today’s topics Machine Architecture The basic machine Basic programming Assembler programming Upcoming Language Translation Reading Great.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
CSIT 301 (Blum)1 Instructions at the Lowest Level Some of this material can be found in Chapter 3 of Computer Architecture (Carter)
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Computer Organization 1
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Stored Program Concept Learning Objectives Learn the meaning of the stored program concept The processor and its components The fetch-decode-execute and.
CSC235 Computer Organization & Assembly Language
Stored program concept
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
Instructions at the Lowest Level
CSCI206 - Computer Organization & Programming
CS149D Elements of Computer Science
Chapter 1 Introduction.
A primer on Computers and Programs
MARIE: An Introduction to a Simple Computer
MARIE: An Introduction to a Simple Computer
CS 111 – Sept. 16 Machine language examples Instruction execution
Chapter 4 The Von Neumann Model
Presentation transcript:

1 Machine Language Alex Ostrovsky

2 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)

3 Introduction (Cont.) There is nothing “below” machine language – only hardware. Machine Language is the only language understood by computers (i.e. it’s native to processor) Impossible for humans to read. Consists of only 0’s and 1’s

4 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.

5 History: Colossus - Visual insight

6 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

7

8 Requirements Every machine language must contain following commands: Load instruction (CPU loads data directly from memory into ac register) consists of: Operation code (opcode) Address of main memory cell from which ac register will be loaded Store instruction stores computed information into a memory cell or CPU(ALU) register Opcode address

9 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

10 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 0’s and 1’s

11 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 load is equal to Add might equal to 2005 Execution speed remains the same because basic instructions (like ADD, SUB, LOAD, STORE, and etc.) are hardwired into CPU.

12 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.

13 Execution Process

14 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 Intel’s 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.

15 References courses.cs.deu.edu.tr/cse122/Machine%20Language.ppt williams.comp.ncat.edu/COMP375/MachineLanguage.pdf oreintrohistorycintro.ppt www2.hawaii.edu/~walbritt/ ics312/basicConcepts/lecture.ppt cs2.cs.brown.edu/lectures/lecture8.pdf /powerpoint/45870wk2-1.ppt

16 Thank You Education is what remains after one has forgotten everything he learned in school. A. Einstein