Survey of Program Compilation and Execution Bangor High School Ali Shareef 2/28/06.

Slides:



Advertisements
Similar presentations
Components of a computer system
Advertisements

The Central Processing Unit: What Goes on Inside the Computer.
Microprocessors. Microprocessor Buses Address Bus Address Bus One way street over which microprocessor sends an address code to memory or other external.
Computer Performance & Storage Devices Computer Technology.
CPSC 2031 What is a computer? A machine that processes information.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Topic 1: Introduction to Computers and Programming
COMPUTER MEMORY Modern computers use semiconductor memory It is made up of thousands of circuits (paths) for electrical currents on a single silicon chip.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Chapter 4  Converts data into information  Control center  Set of electronic circuitry that executes stored program instructions  Two parts ◦ Control.
Atmega32 Architectural Overview
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
BLOCK DIAGRAM OF COMPUTER
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
Computer Organization Hardware and Software. Computing Systems Computers have two kinds of components: Hardware, consisting of its physical devices (CPU,
Topics Introduction Hardware and Software How Computers Store Data
Chapter 4 The System Unit: Processing and Memory Prepared by : Mrs. Sara salih.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction to Computer Science.
Computing hardware CPU.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Microcode Source: Digital Computer Electronics (Malvino and Brown)
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Computer Architecture And Organization UNIT-II Structured Organization.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
© 2005 Pearson Addison-Wesley. All rights reserved Figure 2.1 This chapter focuses on key hardware layer components.
Aug CMSC 104, LECT-021 Machine Architecture Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY of NORTH CAROLINA.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Structure & Architecture 7b - CPU & Buses.
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.
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Assessment Covering… Von Neuman architecture Registers – purpose and use, the fetch execute cycle.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Lecture on Central Process Unit (CPU)
Georgia Institute of Technology Speed part 1 Barb Ericson Georgia Institute of Technology May 2006.
ROM AND RAM By Georgia Harris. WHAT DOES IT MEAN?  RAM: random access memory  ROM: read only memory.
Memory and Storage Aldon Tom. What is Memory? Memory is a solid-state digital device that stores data values. Memory holds running programs and the data.
Compilers and Interpreters
Chapter 1 An Overview of Computers and Programming Languages.
CS 1410 Intro to Computer Tecnology Computer Hardware1.
BY MANJU Lesson 21 Computer Hardware. System Components A computer system requires many components to do its job: Input: Device to input data so it can.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
INTRODUCTION TO COMPUTERS. A computer system is an electronic device used to input data, process data, store data for later use and produce output in.
Information Technology (IT). Information Technology – technology used to create, store, exchange, and use information in its various forms (business data,
MEMORY BYTES. MEMORY BYTES MEMORY MEMORY OUR Internal External.
Computer Systems Nat 4/5 Computing Science
Atmega32 Architectural Overview
Topics Introduction Hardware and Software How Computers Store Data
Overview of Computers and Programming Chapter 1
Computing Hardware.
Computer Organization
Chapter 7.2 Computer Architecture
Introduction to Computer Architecture
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Computers: Hardware and Software
Introduction to Computer Architecture
Topics Introduction Hardware and Software How Computers Store Data
Machine Architecture and Number Systems
Components of a CPU AS Computing - F451.
Logical Computer System
Machine Architecture and Number Systems
A451: Computer Systems and Programming
Computer and Operating System slides extended from Liang’s Java Programming textbook by Professor Parson for CSC 352.
Computer Performance & Storage Devices
4. Computer system.
Presentation transcript:

Survey of Program Compilation and Execution Bangor High School Ali Shareef 2/28/06

Main Components of a Computer External Devices Processor Memory

Memory  Temporary holding area where instructions are stored while they are waiting to be executed.  Data and intermediate values are also stored in memory.  Memory is Volatile  When the power is shut off, everything in memory is lost

Processor Executes Instruction Pentium 4 is a 32 bit processor Processors can process a 32 digit “bit” number at a time. Processor executes instructions one at a time, (technically). Instructions are represented as binary numbers.

Processor Registers Fast memory within the processor where data is stored while an instruction is being executed.

Processor Pentium 4 processor uses a 2.3 MHz clock. Clock oscillates at 2,300,000 cycles/sec Most instructions take about 5 cycles 2,300,000/5 ~ 460,000 instructions are executed per second Even though a processor is executing one instruction at a time, user interaction is very smooth.

Execution Process 1) Program is loaded into memory from external storage (hard drive, floppy disk.) 2) Processor executes instructions from memory

Execution Can the processor understand C code? Can it execute C code?

Compilation The processor cannot understand most high level languages such as C. Need to translate C code to assembly code. Assembly code corresponds to actual numeric values for the instructions that the processor can understand. A compiler is used to translate code written in C to assembly code, so that the processor can understand it.

Demo Compile program in Visual Studio and see the assembly code.

Comparison  Is it better to program in a high level language like C?  Or assembly code?

Comparison Pros : High Level language Easy to use, Easy to debug, Quickly develop programs Cons : Depend on compiler to produce code May not be efficient

Comparison Pros : Assembly Code Can write very efficient, optimal code Can utilize the full functionalities of the processor Cons : Hard to write code, hard to debug Requires knowledge of the architecture of the processor that you are using

Conclusion Main Components of a Computer Processor, Memory, External devices Memory Temporary holding area for instructions Processor Executes instructions

Conclusion Program Execution Load instructions to memory Processor executes instructions Compilation Compiler translates high level language to assembly

Conclusion High level language or Assembly use depends upon application