Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Organization and Machine Language Programming CPTG 245

Similar presentations


Presentation on theme: "Computer Organization and Machine Language Programming CPTG 245"— Presentation transcript:

1 Computer Organization and Machine Language Programming CPTG 245

2 Understanding Computer Systems
Three basic questions associated with understanding computing systems: What are computing systems used for? How are computing systems implemented? What are computing systems able to do and how well can they do it?

3 Computing Machines Ubiquitous ( = everywhere)
General purpose: servers, desktops, laptops, PDAs, etc. Special purpose: cash registers, ATMs, games, telephone switches, etc. Embedded: cars, hotel doors, printers, VCRs, industrial machinery, medical equipment, etc. Distinguishing Characteristics Speed Cost Ease of use, software support & interface Scalability

4 This course is about: What computers consist of How to fix computers
How computers work How they are organized internally What are the design tradeoffs How design affects programming and applications How to fix computers How to build myself one real cheap Which one to buy Knowing more about how a PentiumIII or PowerPC works internally

5 What is Computer Organization?
Electronic Devices Desired Behavior … a very wide gap between the intended behavior and the raw (unorganized) electronic devices. The forerunners to modern computers attempted to assemble the raw devices (mechanical, electrical, or electronic) into a separate purpose-built machine for each desired behavior.

6 Role of General Purpose Computers
organization / hardware software Electronic Devices General Purpose Computer Desired Behavior We will break the gap into multiple levels and build an island in the middle. A general purpose computer is an island that bridges the gap between the desired behavior (application) and the raw material (electronic devices).

7 Two Important Ideas Universal Computational Devices
Given enough time and memory, all computers are capable of computing exactly the same things (irrespective of speed, size or cost). Turing’s Thesis: every computation can be performed by some “Turing Machine” - a theoretical universal computational device (not mathematically proven, but taken to be true). Problem Transformation The ultimate objective is to transform a problem expressed in natural language into electrons running around a circuit! That’s what Computer Science and Computer Engineering are all about!

8 Problem Transformation - finer breakdown
Desired Behavior: application Natural Language Algorithm Program Machine Architecture Devices Micro-architecture Logic Circuits Raw Material: electronic devices

9 The Program Level Most computers run a special management program called the operating system (OS). Application programs interface to the machine architecture via the OS. An example: Application Program Operating System Program (Software) This lecture PowerPoint Windows NT Data Application Program Operating System

10 The Machine Level Machine Architecture Microarchitecture Logic Circuit
This is the formal specification of all the functions a particular machine can carry out, known as the Instruction Set Architecture (ISA) (8.2.1) Microarchitecture The implementation of the ISA in a microprocessor - i.e. the way in which the specifications of the ISA are actually carried out. (8.2.2 – 8.2.7) Logic Circuit Each element of the microarchitecture is composed of simple logic circuits (chapters 2 to 6) Devices Finally, each logic circuit is actually built of electronic devices such as CMOS or NMOS or GaAs (etc.) transistors

11 Course Outline - What is Next?
How to represent numbers The building blocks of computers: logic gates The basic algorithm: the von Neumann model An example: the LC-3 structure and language Programming the machine: assembly language

12 The Von Neumann Model Basic components Instruction processing

13 The von Neumann Model - 1 Memory Processing Unit Input Output
MAR MDR ALU TEMP Control Unit PC IR *keyboard *monitor Memory: holds the instructions and data Processing Unit: processes the information Control Unit: manages computer activity Input: external information into the memory Output: produces results for the user

14 The von Neumann Model - 3 Central Processing Unit (CPU)
ALU (Arithmetic and Logic Unit) Generally operates on entire words of data Some also work on subsets of words (eg. bits and bytes) Registers: Small, fast “on-board” storage for words Close to the ALU (much faster access than RAM) Control Unit Program Counter (PC) or Instruction Pointer Holds the address of the next instruction to be executed Instruction Register (IR) Holds the instruction being executed The control unit coordinates all actions needed to execute the instruction

15 The von Neumann Model - 2 Memory (RAM) Input & Output
Each location has an address and contents Address: set of bits that uniquely identify a memory location (eg. 20 bits gives an address space of 220 locations) Addressability (Byte vs. Word): Note: a Word is the basic unit of data used by the processing unit (usually multiple bytes) The size of the memory location referenced by a given address Input & Output LC3 deals only with keyboard and monitor More details later

16 The LC-3 Data and Control Paths

17 Stopping the Computer Operating System External Control
controls the computer when a program completes: it exits it returns control to the operating system OS is ready for next command or program External Control kill or halt a program reset a computer

18 The Clock The Drum Beat of the Computer
every operation happens in multiples of a clock cycles 0 volts one clock cycle 2.9 volts time if the run latch is set (output Q = 1) then the clock output is the same as the clock generator if the latch is reset (off) then the clock output is disabled clock Q Clock generator (crystal) S R Run Latch


Download ppt "Computer Organization and Machine Language Programming CPTG 245"

Similar presentations


Ads by Google