Lecture 2. How does the computer work? Prof. Sin-Min Lee Department of Computer Science.

Slides:



Advertisements
Similar presentations
The Central Processing Unit: What Goes on Inside the Computer.
Advertisements

 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
Digital Data Representation
FIRST COURSE Essential Computer Concepts. New Perspectives on Microsoft Office 2007: Windows XP Edition 2 Objectives Compare the types of computers Describe.
Computer Hardware.
Main Memory Lecture 2 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Introduction to Computers
COMP 14 Introduction to Programming
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Lecture 2. How does the computer work? Prof. Sin-Min Lee Department of Computer Science.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
Computer Hardware Information Technology Week 5 and 6
Chapter 4  Converts data into information  Control center  Set of electronic circuitry that executes stored program instructions  Two parts ◦ Control.
Chapter 3 – Computer Hardware Computer Components – Hardware (cont.) Lecture 3.
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.
Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI CSCI.
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
Understanding Computer Basics. Computer Case- The part of a computer system that houses the microprocessor, the RAM (Random Access Memory), and the Motherboard.
Tom Allen Computer Science Department Trinity University.
Chapter 4 The System Unit: Processing and Memory Prepared by : Mrs. Sara salih.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
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.
Computer Terms. Computer A machine designed to run programs and store information that you create.
Computer Basics COMPUTER TECHNOLOG Y 1. What Is a Computer? An electronic device Accepts data and instructions Manipulates, processes, and displays the.
Introduction to Computers
What is a Computer ? What is the application of computer in Our Daily Life ? What is the application of computer in Teaching Field?
Introduction to Computers
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Business Computer Information Systems I.  Knowing how to use a computer is a basic skill necessary to succeed in business or to function effectively.
Computer Hardware Information Technology Week 5 and 6
Course ILT Basics of information technology Unit objectives Define “information technology” (IT), distinguish between hardware and software, and identify.
The Central Processing Unit: What Goes on Inside the Computer
COMP3221 lec04--prog-model.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lecture 4: Programmer’s Model of Microprocessors
The Four Parts of a Computer. Definition of a Computer A computer is an electronic device used to process data, converting the data into information that.
Lecture 2. How does the computer work? Prof. Sin-Min Lee Department of Computer Science.
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.
GCSE Information Technology Computer Systems 2 Hardware is the name that is given to any part of a computer that you can actually touch. An individual.
Computer Confluence 7/e © 2006 Prentice-Hall, Inc.
BAT3O / BTX4C. Definition: A computer is an electronic machine that 1) takes in data and instructions (input) 2) works with the data (processing) 3) puts.
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 General System Architecture.
Computer Science 101 Computer Systems Organization.
Computer Organization & Assembly Language © by DR. M. Amer.
CSCI-100 Introduction to Computing Hardware Part I.
1 Course Title: IT IN BUSINESS Course Instructor: ADEEL ANJUM Chapter No: 04 1 BY ADEEL ANJUM (MCS, CCNA,WEB DEVELOPER)
The Computer System CS 103: Computers and Application Software.
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,
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Memory The term memory is referred to computer’s main memory, or RAM (Random Access Memory). RAM is the location where data and programs are stored (temporarily),
CSE1301 Sem July 24, 2003 CSI 121 Structured Programming Language Lecture 1 Computer Systems Overview Lecture 1: Computer Systems Overview.
1 TM 1 Embedded Systems Lab./Honam University ARM Microprocessor Programming Model.
SEPTEMBER 8, 2015 Computer Hardware 1-1. HARDWARE TERMS CPU — Central Processing Unit RAM — Random-Access Memory  “random-access” means the CPU can read.
Introduction To Computer Programming – 1A Computer Parts, Words, and Definition Herriman High School.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
~How PC Parts Work~ (30 MARKS). List 4 External components you can see on the PC in front of you and describe the basic function of each one. 1) DVD Drive.
Information Technology (IT). Information Technology – technology used to create, store, exchange, and use information in its various forms (business data,
Computer Graphics HARDWARE. Computers  Computers are automatic, electronic machines that –accept data & instructions from a user (INPUT) –store the data.
Introduction to Computers - Hardware
CSE1301 Computer Programming: Lecture 1 Computer Systems Overview
Computer Hardware and Software
The Central Processing Unit
Introduction to Computer Architecture
COMPUTER MEMORY & DATA STORAGE
Introduction to Computers
COMPUTER MEMORY & DATA STORAGE
Introduction to Computers
Computer Hardware.
PZ01C - Machine architecture
Presentation transcript:

Lecture 2. How does the computer work? Prof. Sin-Min Lee Department of Computer Science

Practice, Practice, Practice! Use casette tape recorder to listen, practice Try videotaping Seek feedback from friends Use phrases, not sentences Notes separate from slides (don’t read slide) Pick appropriate font, size (~ 24 point to 32 point) Estimate talk length ­ 2 minutes per slide Use extras as backup slides (Question and Answer) Use color tastefully (graphs, emphasis) Don’t cover slides Use overlays or builds in powerpoint

‘Computer” of the day Jacquard loom late 1700’s for weaving silk “Program” on punch cards “Microcode”: each hole lifts a set of threads “Or gate”: thread lifted if any controlling hole punched

Card Punch Early “programmers” were well-paid (compared to loom operators)

Computer Architecture = Instruction Set Architecture + Machine Organization + …

Instruction Set Architecture Instruction set architecture is the attributes of a computing system as seen by the assembly language programmer or compiler. This includes –Instruction Set (what operations can be performed?) –Instruction Format (how are instructions specified?) –Data storage (where is data located?) –Addressing Modes (how is data accessed?) –Exceptional Conditions (what happens if something goes wrong?) A good understanding of computer architecture is important for compiler writers, operating system designers, and general computer programmers.

Understanding Computer Basics

Computer Case- The part of a computer system that houses the microprocessor, the RAM (Random Access Memory), and the Motherboard. This case also houses the disk drives. CPU (Central Processing Unit) - A chip or circuit that interprets and executes programs by processing a list of machine instructions which perform binary operations on data stored in memory. The portion of hardware in a computer which interprets instructions and then executes them. It is the heart of any computer system.

Memory- The internal component that the computer uses to temporary store data and programs. There are two kinds of computer memory: RAM (Random Access Memory) and ROM (Read-Only Memory). RAM loses its data if the power is turned off; ROM retains its information whether the computer has power or not. Users are unable to erase ROM. Not to be confused with storage devices such as hard drives, floppy disks, or other such devices. Data is processed in RAM memory; it is stored on a storage device.

Motherboard- The main circuit board in the computer.Every device is connected to the Motherboard. Also called planar, system board, or backplane, depending on the architecture of the board.

Intel, the world's biggest semiconductor maker, said Monday it built a test chip with a new process that creates faster circuits by packing 10 million transistors into an area the size of the tip of a ballpoint pen. Intel, based in Santa Clara, Calif., has made the first working memory chip that uses so-called 65-nanometer technology to shrink the circuits inside chips, Intel researcher Mark Bohr said during a conference call. Aug. 31, 2004, 12:05AM Big gain in small package Intel test chip boasts technology to add to speed

Video Card –This card connects to the Motherboard and the computer monitor connects to the videocard. That is how images are interpreted and displayed to the monitor.

Network card- Device connected to the motherboard which is used for communicating on a network to other computers, printers and other electronic devices (ex. Phones, cell phones ect…)

Network Card- Device connected to the motherboard which is used for communicating on a network to other computers, printers and other electronic devices (ex. Phones, cell phones ect…) Network Card Driver- A program that instructs the device on how to operate.

Hard Drive- A device that is connected to the motherboard and is used for storage of data files. Usually this device is referred to as your c:\ drive. Storage capacity can be measured in Kb, Mb, Gb and Tb.

Floppy Drive- A device that is also connected to the motherboard that allows you to use a portable storage media called floppies;which are used to store data. The floppies come 5 ¼’’(which are no longer popular) and 3 ½’’ sizes (which is still the most widely used media up-to-date.). The floppies storage capacity is no where near the storage capacity of a harddrive. ( Ex. 1Gb Harddrive can hold information that is on 695 floppies);Get the point?

Bit

so a k is... k in computing is short for kb or kilobyte where kilo means the same as anywhere else in our measurement system: 1000 so a k is 1000 bytes how about Mb? b for byte again, and M for mega: megabyte big M for mega, small m means milli, or one thousandth, 1/ 1000 as in mm, thousandths of a metre mega in our measurement system means one million, or a thousand thousand, so a megabyte is a thousand kilobytes or one million bytes how about GB? you can now buy hard disk drives in Gb, gigabytes, thousands of Mb or thousands of millions of bytes, so a 5Gb HDD holds 5000 Mb of data with some large computers storing up to Tb, terabytes... yup, thousands of Gb... so one terabyte (Tb) = 1000 gigabytes (Gb) = megabytes (Mb) = kilobytes (kb) = bytes or one thousand billion bytes of information

CD-ROM DRIVE- means Compact Disk - this drive uses a laser to read (read-only) the information in the tiny but complex pattern stamped permanently onto computer compact disks. Read Only Memory CD's are much tougher than floppies, and hold more than 600Mb of information CD-writer drives are now available,so people can burn their own CDs, e.g. to backup files permanently established computer shops or print shops now have their own CD-writers, and will backup your files by burning them.You can also record your music CD.

What is a Computer? Data Primitive Operations Sequence Control Data Access Storage Management Operating Environment May be actual hardware computer or software- simulated computer. Most computers a combination of the two.

In mathematics you don't understand things. You just get used to them. John von Neumann

Typical Machine Layout Two cycles: Fetch cycle - get instruction Execute cycle - do operation

Typical Machine Execution Typical fetch cycle: (M(x) means contents of x) 1.M(IC)  MAR [Memory Address register] 2.IC +1  IC [Instruction Counter] 3.Read memory into MDR [Memory Data Register] 4.MDR  IR [Instruction Register for decoding]

Typical Machine Execution (continued) Typical execute cycle: (OP R,X, DISP is instruction) 1.IR decoded into OP R, EA –OP is operation code (e.g., 8 bits) –R is register (e.g., 4 bits registers) –EA is effective address (e.g., 20 bits) 2.M(X)+DISP  MAR (EA  MAR) 3.Read memory into MDR 4.M(R)  ALU; M(MDR)  ALU 5.Do operation OP in ALU; ALU  R For 500 MHZ: Each instruction 9-10 cycles (50 MIPS) By overlapping fetch and execute cycles, get MIPS

Typical Machine Translation For example: As we see later, memory for data in blocks of storage pointed to by a register: X = Y + Z could be translated as: load R1, R2, 28[Location of Y] add R1, R2, 40 [Location of Z] store R1, R2, 24[Location of X] Instruction format: Opcoderegister, index, offset load R1, R2, 24

Ways to Construct a Computer Hardware Realization –Any precisely defined algorithm or data structure may be realized in hardware. Firmware Realization –Microprogramming or emulation Virtual Machine –Provided by a language environment Combination

Von Neumann Model of Execution Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Obtain instruction from program storage Determine required actions and instruction size Locate and obtain operand data Compute result value or status Deposit results in storage for later use Determine successor instruction Almost all Modern Computers are Von Neumann machines

Decimal system, base 10 History -- we have 10 fingers 253 means 2* *10 + 3*1 1,10,100 (from R to L) are the “weights” 10 digits, values 0 through 9 After 9 comes 10 (double digits) Grade school learn by rote 7*9 = 63 Nothing magic -- we are trained on it

Octal system, base 8 Mickey Mouse has 8 fingers 253 means 2*64 + 5*8 + 3*1 1, 8, 64 are the weights 8 digits, values 0 through 7 After 7 comes 10 Used to display memory addresses in some older computers e.g.,

Hexadecimal system, base16 16 digits, values and A-F 3B6 means 3*256 + B*16 + 6*1 1, 16, 256 are the weights After F comes 10 Used to display memory addresses in most modern computers e.g., 3C0F 95EA

Binary system, base 2 2 digits, values 0 and means 1*8 + 0*4 + 1*2 + 1*1 1, 2, 4, 8 are the weights After 1 comes 10 Count

Binary system, base 2 Used to do calculations in all computers Used to store values in memory and on disk Not practical for people = 4701

Best way to use number systems Binary system inside the computer (storage and calculations reduce to simple logic, the main subject of Comp 120) Input-Output done in decimal for user Software translates in both directions

Convert Binary to Decimal Binary Value *16 + 0*8 + 1*4 + 0*2 + 1*1 = 21 Convert these: 1100 = ? 1001 = ? 0111 = ?

Convert Decimal to Binary Given decimal value = ? 31 = ?

Decimal notation with fractions means: 7*10 + 2*1 + 5*.1 + 3*.01 The “.” is the decimal point Weights are “.” This is not scientific notation This is not floating point storage

Binary notation with fractions binary means: 1*4 + 1*2 + 0*1 + 1*.5 + 0*.25 = 6.5 dec The “.” is the binary point Weights are “.” 1/2 1/4 1/8 This is not scientific notation This is not floating point storage binary = ? decimal

Memorize dec, hex, binary counts A B C D E F1111

Convert Binary to Power 2 base Very easy -- convert digit-by-digit A27F (Hex-Bin) (Octal-Binary) B4C5 = ? = ?