CHAPTER 2: HOW DOES THE COMPUTER REALLY WORK Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder at al.

Slides:



Advertisements
Similar presentations
McGraw-Hill/Irwin ©2008 The McGraw-Hill Companies, All Rights Reserved Plug-in B3 HARDWARE & SOFTWARE.
Advertisements

 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Hardware Basics: Inside the Box 2  2001 Prentice Hall2.2 Chapter Outline “There is no invention – only discovery.” Thomas J. Watson, Sr. What Computers.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
CS 104 Introduction to Computer Science and Graphics Problems Basic Organization & Concepts 09/09/2008 Yang Song (Prepared by Yang Song and Suresh Solaimuthu)
CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
How Computers Work. A computer is a machine f or the storage and processing of information. Computers consist of hardware (what you can touch) and software.
 Chasis / System cabinet  A plastic enclosure that contains most of the components of a computer (usually excluding the display, keyboard and mouse)
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
UNIX Unbounded 5 th Edition Amir Afzal Chapter 1 First Things First.
CSCI 125 & 161 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction to Computer Science.
Georgia Institute of Technology Introduction to Programming Part 2 Barb Ericson Georgia Institute of Technology May 2006.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
Chapter Two Hardware Basics: Inside the Box. ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
1 BUSINESS TECHNOLOGY TODAY Chapter Two How ICT Works.
 Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.
CISC105 General Computer Science Class 1 – 6/5/2006.
1 Bits, Bytes, and Binary Numbers Bits and bytes are small pieces of computerized data that communicate commands to a computer’s CPU: A bit is either a.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
Computer Parts. Two Basic Parts Hardware & Software.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
The Central Processing Unit: What Goes on Inside the Computer
Computer Systems TexPREP Summer Camp Computer Science.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Computer Confluence 7/e © 2006 Prentice-Hall, Inc.
IT Groundwork ICS3UC - Unit 1 Hardware. Overview of Computer System.
1 Hardware and Software b Hardware the physical, tangible parts of a computerthe physical, tangible parts of a computer keyboard, monitor, wires, chips,
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Computer Architecture And Organization UNIT-II General System Architecture.
Computer Science 101 Computer Systems Organization.
Chapter 4 MARIE: An Introduction to a Simple Computer.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
Computer Organization. The Five Hardware Units General purpose computers use the "Von Neumann" architecture Also referred to as "stored program" architecture.
20 October 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
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,
The Computer System.
Chapter Two Hardware Basics: Inside the Box ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
COMPUTER SYSTEM A computer system is define as combination of components designed to process data and store files. A computer system consists of four.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
CHAPTER 1 COMPUTER SCIENCE II. HISTORY OF COMPUTERS (1.1) Eniac- one of the worlds first computers Used more electricity than an entire city block of.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Computer Architecture and Number Systems
APPENDIX A Hardware and Software Basics
Computer Science II Chapter 1.
Computer Hardware and Software
Chapter 7.2 Computer Architecture
The Central Processing Unit
TexPREP Summer Camp Computer Science
General Architecture of Digital Computer
Introduction to Computers
Introduction to Computers
Topics Introduction Hardware and Software How Computers Store Data
The Von Neumann Architecture
A451 GCSE Computing | Hardware| Required knowledge
Computer Science. The CPU The CPU is made up of 3 main parts : Cache ALU Control Unit.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

CHAPTER 2: HOW DOES THE COMPUTER REALLY WORK Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder at al

Basic Nomenclature & Components of a Computer System  A computer system has:  A main computer  A set of peripheral devices  A digital computer has three main parts:  Central Processing Unit(s), or CPU(s)  Memory Unit(s)  Input/Output Unit(s) (c) 2012 Ophir Frieder at al

Peripheral Devices  Complement the computer to create a computer system  Input: transfers information from outside to the computer  Output: transfers information from the computer to the outside  Input/Output (I/O): bi-directional data transfer Three types: (c) 2012 Ophir Frieder at al

Peripheral Devices  Input: provides information to the computer  Keyboards, touch screens, microphones, various sensors for light and other forms of energy, read only memories of various types (CD/DVD etc)  Output: sends information from the computer  Printers, screens, light & audio devices, various signaling devices, archival devices of various types (CD/DVD etc)  Input/Output (I/O): bi-directional  Disks, tapes, memory cards, CD/DVD RW drives, mass memories, communication devices (c) 2012 Ophir Frieder at al

Von Neumann Model  Almost all computers are based on this model of computing  The memory holds the instructions that comprise the computer program and all the necessary data values  A control unit fetches the instructions and causes their execution (c) 2012 Ophir Frieder at al

The control unit fetches data from memory to the CPU Von Neumann Model Data Control Unit Memory Unit CPU (c) 2012 Ophir Frieder at al

The CPU then performs the function specified by the function Von Neumann Model Print “2” Result 2 Result 2 CPU (c) 2012 Ophir Frieder at al

The control unit saves the result to a “memory” and selects the next instruction Von Neumann Model Result 2 Result 2 Result Control Unit (c) 2012 Ophir Frieder at al

The control unit saves the result to a “memory” and selects the next instruction Von Neumann Model Result Instruction Memory (c) 2012 Ophir Frieder at al

Memory  The memory stores its contents in a sequence of numerical digits  The number system used is based on the radix system  “r” symbols, called digits, carry consecutive values from 0 to r – 1 (c) 2012 Ophir Frieder at al

Radix Representation: r = (c) 2012 Ophir Frieder at al

Radix Representation: r = (c) 2012 Ophir Frieder at al

Binary System  Prevalently used in computers  Based on radix two, the symbols are called bits  Each bit can have r = 2 values  Either 0 or 1 Decimal SystemBinary System (c) 2012 Ophir Frieder at al

Consecutive natural numbers are used as addresses to access content from the memory Addresses Memory Data Data Address (c) 2012 Ophir Frieder at al

Addresses  Refer to cells that hold eight bits, called bytes  Can be grouped into larger strings  Can be accessed in an arbitrary order Referred to as Random Access Memories, or RAM Bart’s House Address (c) 2012 Ophir Frieder at al

Scales of Magnitude  Mass storage devices are colloquially measured using units based on the powers of 10  Customary to “equate” 2 10 to 10 3, or 1k, because 2 10 = 1024, which is close to 1000  As the sizes increase, the disparity increases dramatically (c) 2012 Ophir Frieder at al

Scales of Magnitude  In 2005, a standard was defined for quantities expressed as powers of 2  Precise numbers for sizes can be stated using multiples of powers of 2, in steps of exponents that are multiples of 10 (c) 2012 Ophir Frieder at al

Table 2.1: Unit Names and Their Sizes Scales of Magnitudes UnitsActual Size (bytes)Other Names Megabyte (MB)1,000,000Million, 10 6 Mebibyte (MiB)1,048, Gigabyte (GB)1,000,000,000Billion, 10 9 Gibibyte (GiB)1,073,741, Terabyte (TB)1,000,000,000,000Trillion,10 12 Tebibyte (TiB)1,099,511,627, (c) 2012 Ophir Frieder at al

Instruction Execution  Instructions are executed in timed phases  Phases may be overlapped  Each instruction is controlled by a timing mechanism, called a clock  Clocks operate according to a periodicity This periodicity defines the time step of the phases Some instructions require multiple time steps (c) 2012 Ophir Frieder at al

Most 2013 computers operate on a clock that is between 2 GHz and 10 THz (Table 2.2 : Scales of Time and Frequency) Instruction Execution UnitsFraction of a SecondSymbol Second1sec Hertz1Hz Microsecond10 -6 μ sec Megahertz10 6 MHz Nanosecond10 -9 nsec Gigahertz10 9 GHz (c) 2012 Ophir Frieder at al

Instruction Execution  Actual computer speeds are measured by instruction rate  Expressed in: MIPS (Million Instructions Per Second). GIPS (Billion Instructions Per Second). FLOPS (Floating Point Operations Per Second). TREPS (Trillion “Edges” Per Second – new 2011 measure) (c) 2012 Ophir Frieder at al

Bit Sequences  The interpretation of a bit sequence’s meaning depends on the usage of the sequence  A bit sequence can be interpreted as an instruction (numerical, logical, control or program flow)  Bit sequences can also represent data (integer, float or real, character) (c) 2012 Ophir Frieder at al

Data Types (Hardware)  Represents a numerical value in radix two  Limited by the length of its string representation  Regular: 4 bytes  Long: 8 bytes  Numbers represented in scientific form, as x  2 y IntegerFloating or Real (c) 2012 Ophir Frieder at al

Data Types  One to four bytes  Can come as a single character or as a part of a string of characters  The character “9” is stored differently than the integer 9 Character (c) 2012 Ophir Frieder at al

Interpreter Process & Ruby  Programming languages express algorithms using sequences of statements  Cannot be executed by a computer because they are not written in binary digits  Two common methods that computers use to execute programming languages’ instructions: compilation and interpretation  Mix – partial compilation to an intermediate code (c) 2012 Ophir Frieder at al

Compilation  A compiler is a program that performs compilations  Compilation is a process which analyzes and translates a program into computer instructions  Translates programs statement by statement  Does not execute code  Stores executable code expressed by bits in a file (c) 2012 Ophir Frieder at al

Interpretation  Interpretation is a process that analyzes and executes each statement as it is encountered  Does not produce instruction for the computer  Two main ways to do interpretation: interactive mode and batch mode (c) 2012 Ophir Frieder at al

Interpretation  The interpreter executes each statement after the user enters it  The entire program is prepared and stored in one file  It becomes input for the interpreter that analyzes and executes each statement Interactive ModeBatch Mode (c) 2012 Ophir Frieder at al

Summary  A computer system includes a computer and peripheral devices of various types  Peripheral devices are divided into user and computer interface, communication, and mass memory devices  A computer consists of a single or several Central Processing Unit(s)  The von Neumann model of computing is the prevalent model for the architecture of computers (c) 2012 Ophir Frieder at al

Summary  The memory stores its contents in a sequence of numerical digits expressed in binary.  The computer uses strings of numbers, or addresses, to access contents in the memory  Instructions are executed in time phases and controlled by a clock (or several colcks)  All data are stored in binary form, but their interpretation depends on their usage  Programs are either compiled or interpreted (c) 2012 Ophir Frieder at al