Computer Organization Intro 1 CEG 320/520: Computer Organization and Assembly Language Programming Introduction to Computer Organization.

Slides:



Advertisements
Similar presentations
Give qualifications of instructors: DAP
Advertisements

Lecture 1: Overview of Computers & Programming
CSC 2400 Computer Systems I Lecture 3 Big Ideas. 2 Big Idea: Universal Computing Device All computers, given enough time and memory, are capable of computing.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-1 Introduction to Computing Systems: From Bits and Gates.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
1. By the end of this lecture you should be able … To describe in general terms how computers function To describe the fetch-execute cycle To explain.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Copyright © 2003 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Slides prepared by Walid A. Najjar & Brian J. Linard,
CPEN Digital System Design Chapter 9 – Computer Design
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
1 Patt and Patel Ch. 1 Abstraction and Computer Systems.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
CEG 320/520: Computer Organization and Assembly Language Programming1 CEG 320/520 Computer Organization and Assembly Language Programming.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-1 Introduction to Computing Systems: From Bits and Gates.
Computer Organization
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP
1 Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
1 College of Charleston, School of Science & Mathematics Dr. Anderson, Computer Science Department CS 250 Comp. Org. & Assembly CS 250 – Computer Organization.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
1 Wright State University, College of Engineering Dr. T. Doom, Computer Science & Engineering EGR 191 Intro. to Engineering Dr. Travis Doom Wright State.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-1 Introduction to Computer Engineering ELEC S100F (Fall.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
CPIT 201 Introduction to Computing
CSCI 211 Intro Computer Organization –Consists of gates for logic And Or Not –Processor –Memory –I/O interface.
Computer Architecture And Organization UNIT-II General System Architecture.
Computer Engineering Rabie A. Ramadan Lecture 1. 2 Welcome Back.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Chapter 4 MARIE: An Introduction to a Simple Computer.
The Nature of Computing INEL 4206 – Microprocessors Lecture 2 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez.
PART 1 Introduction 1. Layers of Abstraction 2. Turing Machine 3. Layer Transformation 4. Descriptions of Layers.
Microarchitecture. Outline Architecture vs. Microarchitecture Components MIPS Datapath 1.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Introduction to Computer Engineering CS/ECE 252, Spring 2008 Prof. David A. Wood Computer Sciences Department University of Wisconsin – Madison Adapted.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
CS150: Computer Organization and Architecture Michael D. Wilder, Ph.D.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Chapter 1 Welcome Aboard. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-2 Introduction to the World of.
Computer Organization and Architecture Lecture 1 : Introduction
Yale N. Patt Sanjay J. Patel
Java Programming: From the Ground Up
Computer Organization and Machine Language Programming CPTG 245
Basic Computer Organization and Design
Computer Organization and Architecture + Networks
Introduction to Computer Engineering
Instructor:Po-Yu Kuo 教師:郭柏佑
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Introduction to Computer Engineering
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Welcome Aboard 1.
The Von Neumann Model Basic components Instruction processing
Instructor:Po-Yu Kuo 教師:郭柏佑
Introduction to Micro Controllers & Embedded System Design
Introduction to Computer Engineering
Computer Architecture
Computer Systems An Introducton.
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

Computer Organization Intro 1 CEG 320/520: Computer Organization and Assembly Language Programming Introduction to Computer Organization

Computer Organization Intro 2 CEG 320/520: Computer Organization and Assembly Language Programming Computer Organization: Goals l Instruction cycle (fetch, execute, store) l Memory organization –Big endian / little endian –Bytes, words, long l Primary components of a computer –CPU (control unit, ALU, registers), memory, I/O, datapath l Von Neumann Architecture –Stored program computer l Know about ISAs. What are they? How do they fit in? l Assigned Reading –General Computer Organization: HVZ Chapter 1, 7.1, 7.2 –Memory: HVZ Chapter 2.2

Computer Organization Intro 3 CEG 320/520: Computer Organization and Assembly Language Programming What is a computer? l What is computation? l There are many sorts of computing devices, they fall into two categories: –Analog: machines that produce an answer that measures some continuous physical property such as distance, light intensity, or voltage. Examples? –Digital: machines that perform computations by manipulating a fixed finite set of elements. Examples? –The difficulty with analog devices is that it is very hard to increase their accuracy. l Before modern digital computers, the most common digital machines were adding machines. –Adding machines perform exactly one sort of operation. l Computers also perform one operation… but their operation is to accept a set of instructions that tell it how to do any sort of computation.

Computer Organization Intro 4 CEG 320/520: Computer Organization and Assembly Language Programming Universal computing devices l Turing’s Thesis: Computer scientists believe that ANYTHING that can be computed, can be computed by a computer (provided that it has enough time and enough memory). l What does this imply? –All computers (from the least expensive to the most expensive) are capable of computing EXACTLY the same things IF they are given enough time and enough memory. –Some computers can do things faster, but none can do more than any other computer. –All computers can do exactly the same things! l Thus, any given problem is either computable or it is not computable –Problems may be computable, but still not feasible (NPC)

Computer Organization Intro 5 CEG 320/520: Computer Organization and Assembly Language Programming How do we get the electrons to do the work? l We describe our problems in English or some other natural language. Computer problems are solved by electrons flowing around inside the computer. l It is necessary to transform our problem from a natural language to the voltages that influence the flow of electrons. l This transformation is really a sequence of systematic transformations, developed and improved over the last 50 years, which combine to give the computer the ability to carry out what may appear to be very complicated tasks. In reality, these tasks must be simple and straight-forward.

Computer Organization Intro 6 CEG 320/520: Computer Organization and Assembly Language Programming Overview: Digital Computation l Design Process Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices Software level Hardware level Logic level Computer Science Computer Engineering Computer/Electrical Engineering

Computer Organization Intro 7 CEG 320/520: Computer Organization and Assembly Language Programming Overview: The Problem Statement l We describe problems that we wish to solve with a computer in a “natural language.” l Natural languages are fraught with a lot of things unacceptable for providing instructions to a computer. l The most important of these unacceptable attributes is ambiguity. To infer the meaning of a sentence, a listener is often helped by context that the computer does not have. l Example: “Time flies like an arrow.” –How fast time passes –Track meet –Gossip l A computer is an electronic idiot and can not deal with any ambiguity, thus… Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices

Computer Organization Intro 8 CEG 320/520: Computer Organization and Assembly Language Programming Overview: Algorithm l The first step in the sequence of transformations is to transform the natural language description of the problem to an algorithm. l An algorithm is a step-by-step procedure: –That transforms an input (possibly NULL) into some output (or output action) –That is guaranteed to terminate l Definiteness: Each step is precisely stated. l Effective computability: Each step must be something the computer can perform l Finiteness: The procedure must terminate l For any computable problem, there are an infinite number of algorithms to solve it. –Which solution is best? Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices

Computer Organization Intro 9 CEG 320/520: Computer Organization and Assembly Language Programming Overview: Programming Language l The next step is to transform the algorithm into a computer program l Programming languages are unambiguous “mechanical” languages l There are two kinds of programming languages: –High-level languages are machine independent. They are “far above” the (underlying) computer –Low-level languages are machine dependent. They are tied to the computer on which the program will execute. There is generally only one such language per machine (referred to as its ASSEMBLY language). Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices

Computer Organization Intro 10 CEG 320/520: Computer Organization and Assembly Language Programming Overview: The instruction set architecture (ISA) l The next step is to translate the program into the instruction set of the particular computer that will be used to carry out the work of the program. l The Instruction Set Architecture (ISA) is the complete specification of the interface between programs that have been written and the underlying hardware that must carry out the work of those programs. –Examples: IA-32 (Intel, AMD, and others), PowerPC (Motorola) l Programs are translated from high languages in to the ISA of the computer on which they will be run by a program called a compiler (specific to the ISA). l Programs are translated from assembly to the ISA by an assembler l Analogy: A car –The car’s ISA describes what the driver sees/uses. Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices

Computer Organization Intro 11 CEG 320/520: Computer Organization and Assembly Language Programming Overview: Microarchitecture l The next step is to transform the ISA into an implementation. The detailed organization of an implementation is called its microarchitecture. –The IA-32 has been implemented by several different processors over the past twenty years 8086 (Intel, 1979), 8286, 8386, 8486, Pentium, PentiumII, Athlon, PentiumIII. –Each implementation is an opportunity for computer designers to make different trade-offs between cost and performance. [Computer design is always an exercise in trade-offs.] l Analogy: A car –The implementation of a car’s ISA is what goes on under the hood. Here all automobiles makes and models are different. Some with fuel injection, some have eight cylinders, some are turbocharged… in each case the “microarchitecture” of a specific automobile is the result of the automobile designers’ decisions regarding cost and performance. Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices

Computer Organization Intro 12 CEG 320/520: Computer Organization and Assembly Language Programming Overview: Logic Circuits l The next step is to implement each element of the microprocessor out of simple logic circuits. l Here there are also choices, as the logic designer decides how to best make the trade-offs between cost and performance. l Even in the case of addition, there are several choices of logic circuits to perform this operation and differing speeds and corresponding costs. Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices

Computer Organization Intro 13 CEG 320/520: Computer Organization and Assembly Language Programming Overview: Digital Devices l Finally, each basic logic circuit is implemented in accordance with the requirements of the particular device technology used. l So, CMOS circuits are different from NMOS circuits, which are different, in turn, from gallium arsenide circuits. Algorithm & Language The Problem ISA & Microarchitecture Circuits & Devices V in V out GND V cc RcRc RbRb

Computer Organization Intro 14 CEG 320/520: Computer Organization and Assembly Language Programming Logic Circuits: Types l Logic circuits divide into two major types: –Combinational Logic l Current output depends on current input only l Examples: gates, decoders, multiplexors (MUXs), ALUs –Sequential Logic l Current output depends on past inputs as well as current input l Thus has a memory (usually called the state) l Examples: latches, flip-flops, state machines, counters, shift registers + * p m n p * (m + n) Design: avg (w,x,y,z) a^2+2ab+b^2

Computer Organization Intro 15 CEG 320/520: Computer Organization and Assembly Language Programming l STATE- A collection of state variables whose values at any one time contain all the information about the past values necessary to account for future behavior. l Example: A TV tuner could have a current channel stored internally, so the next channel can be predicted as a function of the inputs, i.e. the UP button increases the channel by one, the DOWN button decreases the channel by one. What is the state of this TV tuner? l Digital sequential logic –State variables are binary values –Circuit with n binary state variables has 2 n possible states –Also known as a finite state machine (FSM). –Changes usually synchronized with a system clock Logic Circuits: Sequential

Computer Organization Intro 16 CEG 320/520: Computer Organization and Assembly Language Programming The instruction set l High-Level Language - C l A = B + C; –Memory-Transfer Equivalent l Mem[A]  Mem[B] + Mem[C] l Mem[EA00]  Mem[EA08] + Mem[EA10] l Machine-Level Equivalent –Assembly (human readable)ex: Machine (for a simple architecture) l Load R2, BE2EA08 l Load R3, C E3EA10 l R2  R2 + R30223 l Store A, R2F2EA00 l The bits of a machine instruction are divided into fields –eg: E2EA08 –E: Operation “Load”; 2: Destination Address R2; EA08: Address Field –The operation field (opcode) defines the format for the instruction

Computer Organization Intro 17 CEG 320/520: Computer Organization and Assembly Language Programming How do we specify the program? l Contemporary languages –C, C++, Perl, Java, and hundreds more. l Languages of Yore –Fortran, COBOL, and scores more. l Specialty languages –VHDL, simulation languages, and thousands more. l There are over 1,000 “standardized” programming languages today. l The only goal of these languages is to help humans implement their algorithms in the instructions available for a particular ISA

Computer Organization Intro 18 CEG 320/520: Computer Organization and Assembly Language Programming Computer Organization: You should know… l Instruction cycle (fetch, execute, store) l Memory organization –Big endian / little endian –Bytes, words, long l Primary components of a computer –CPU (control unit, ALU, registers), memory, I/O, datapath l Von Neumann Architecture –Stored program computer l Know about ISAs. What are they? How do they fit in? l Next Topic –Introduction to Assembly Language –Reading: HVZ Chapter 2.4, 2.5, 2.6, 3.8, 3.9, 3.10, 3.11 –Reference: HVZ Appendix C