Chap_2_CPU_updated - The Processing Unit ❂ Conversation:...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The Processing Unit ❂ Conversation: ❂ What • “……… 33 Megahertz, 486 machines” • “……… 8 Megabytes of RAM” • “…… Coprocessor … Cache memory …..” • Ε Some Computer characteristics Some • Ε Purchase a computer Purchase • Overview of these characteristics • CPU, how data circulates inside?, ... they are arguing about? ❂ This chapter: Summer 2004 1 Why Learn about what’s inside a computer? ❂ Ε Computer Literacy Computer • Able to Use basic Computer knowledge... • Example: – “You have only 16 MB of RAM, You have to extend it ..” – Hence: – – – – Summer 2004 What’s RAM? Know why do I have to extend the RAM? (Where/How) it is ? Where can I plug the RAM. 2 Computer Communication Bits-Bytes ❂ Humans Ε Words Words ❂ Computers Ε Bits: Binary Digits Bits ❂ Binary 3 Two possible values: Two • 1: An ON electrical state (Electrical signal) • 0: AN OFF electrical state (No Electrical signal) V(t) 010110 time 3 Summer 2004 ❂ Bit: The smallest piece of data Bits (Cont.) ❂ All what computers understand is 0 and 1 ❂ As a consequence Ε Every instruction is to Every be translated into the binary system before being processed. ❂ Example: • When you type the Letter “D”, the keyboard transmits the following binary sequence: “10000100” Summer 2004 4 Bytes ❂ 1 Byte = 8 Bits ❂ Ε The basic unit for measuring the memory The size: (KB, MB, GB) • • • KB: Kilo_Byte= 210 = 1024 ≈ 1000 Byte 1024 1000 MB: Mega_Byte = 220 ≈ 1 million Byte million GB: Gega_Byte= 230 ≈ 1 billion Byte billion ❂ Why did they make a byte equal to 8 bits? Summer 2004 5 Bytes ❂ Using one bit you can represent two digits ❂ Using 2 bits you represent up to 22 combinations: • 1 1, 10, 01, 00 ❂ Using 8 bits you can represent up to 28 = 256 combinations (Characters): combinations • 00000000, 00000001, 00000010, …., 11111111 Summer 2004 ❂ Ε 256 is enough to represent all the 256 keyboard characters! 6 Encoding Systems ❂ Ε Systems used to encode characters Systems using bits. ❂ Two widely used ones: • ASCII • EBCDIC See Table_4.7, Page 4_108 ❂ Each character is a assigned a unique Summer 2004 code, I.e, a unique combination on the 8 bits, e.g: “A” => 11000001 7 The CPU Central Processing Unit ❂ Ε The part that processes the Input The ❂ Comprised of two parts: • ALU (Arithmetic-Logic Unit) – Performs Arithmetic (+,-, ….) & Logical (>, <, =, …) operations • Control Unit – Manages/Controls the sequence of instructions. Summer 2004 8 Microprocessor ❂ Before the work of Ted Hoff , the parts of a CPU were on separate chips. ❂ Afterwards, Ted Hoff gathered the CPU components in One chip (Micro chip). Micro chip). ❂ Ε Microprocessor: A single Micro Chip Microprocessor: containing all the CPU components. Microprocessor = Modern CPU ❂ Microprocessor Summer 2004 9 Main Memory ❂ Why main memory? • CPU needs to store information temporarily • e.g: when downloading a program from the hard disk, to store a result that will be used later, .. ❂ Two types: • RAM (Random Access Memory) • ROM [Read Only Memory] Summer 2004 10 Random Access Memory RAM ❂ You want to work with MS_Word, once you click on the MS_Word icon, the data concerning this software are retrieved from their location on the hard disk and stored in the RAM. ❂ Temporary storage: Once you quit MS_Word, its data is removed from RAM ❂ Volatile: Every thing goes off when Every computer is shut off. ❂ Read / Write Summer 2004 11 ROM Read Only Memory ❂ Ε Can only be read Can ❂ Why? • In ROM, important (system) data is stored • e.g, Instructions checking the status of different hardware, How to load the OS, … ❂ ROM contents are set by the manufacturer ❂ Ε Non-Volatile (Permanent) Non-Volatile Summer 2004 12 Other Special-Named memories Registers ❂ Registers => Part of the CPU Summer 2004 • As a consequence: Transfer of data into and Transfer out of registers is very fast • A register holds only one piece of data that will that be used immediately • e.g: To perform the following formula: (2*3) + (4*5) The CPU will first compute (4*5), store the result compute in a register, secondly, compute (2*3), then add the result to the result previously stored in the13 register Other Special-Named memories Buffers ❂ Another temporary storage space ❂ BUT: Unlike registers, buffers can hold BUT: Unlike more than one piece of data. ❂ What’s their use? Summer 2004 • Buffers holds data that go into or out from output and input devices! • E.g: When you print a document, the data is sent to a buffer, thereafter processed by the printer. • Why this? => Printers work at a slower rate in comparison with the CPU. 14 Other Special-Named memories Cache Memory ❂ High speed memory • Information are accessed very quickly ❂ Located between the CPU and RAM ❂ Stores only the most frequently used data ❂ The CPU looks first at the Cache for the information. • If it finds the information => ‘HIT’ • else, looks at the RAM. Summer 2004 15 How is Memory Used? ❂ Once the computer is turned ON, RAM is empty, Instructions in ROM checks the hardware status, then download the OS onto the RAM. ❂ If you want to write a letter, the appropriate software (MS_Word) is downloaded to the RAM. Summer 2004 16 How Data circulates inside? ❂ The different hardware components (CPU, RAM, Hard Disk, Floppy Disk, … ) need to communicate in order to function. ❂ The path of communication is called a BUS ❂ A BUS is classified according to its function: • Data Bus: To transmit data Data To • Address Bus: To transmit the the Location (Address) of data / instruction • Control Bus: To Transmit control functions To Summer 2004 17 How CPU processes an instruction - Instruction Cycle ❂ Instructions: • Retrieve data from storage • Send data to an output device (e.g screen) • Computations … ❂ Ε Control Unit: Coordinates the interaction Control between the different Computer Elements ❂ Instruction Cycle: Summer 2004 • Instruction Time • Execution time 18 Instruction cycle ❂ See Figure 4-2 _ Page 4-103 ❂ Instruction time: • Ε Time for Fetching (Retrieving) an instruction Time and store it in the register. ❂ Execution time: • Once the instruction is fetched, it is time to process it: – Decoding – Executing – Storing (The result) Summer 2004 19 Clock Speed ❂ Ε The main element determining the speed The of a computer! ❂ Unit of Measure: MegaHertz Ε 1 Million (Of what?) / Sec Sec Million ❂ A computer with a clock speed of 166 MHz is largely faster than a 33 MHz computer. Ε 166 MHz means that the smallest time slot is 166 is (1/166 million) Sec, in other words, one Sec is 20 be divided to 166 million slots. Summer 2004 Clock Speed (Cont.) ❂ If an instruction is to be done in one time an slot, the computer will perform 166 Million Instructions Per Sec (MIPS) !, whereas the 66 MHz will perform only 66 MIPS ❂ Another factor determining the speed of a computer Ε Data Bus Width Data Summer 2004 21 Data Bus width ❂ Ε How many bits can be handled at a time. How ❂ Example: a 32 bit Vs. a 16 bit computer • In order to transmit a sequence of 32 bits, a 32 bit computer will transmit the 32 bits in half the time required by a 16 bit computer . ❂ Conclusion: • Basically, the clock speed and the data bus width are two major factors in determining the computer speed (MIPS). Summer 2004 22 What factors should I consider in purchasing a PC? “Cost reflects Power” “Cost ❂ 2. Applications: Which applications am I using, “Using MS_Office” would not require a powerful CPU as you do when using Graphics / Databases ❂ 3. Compatibility: If I am working in a group 3. If using IBM compatible stations, I would better not purchase a Macintosh, ‘cause the two platforms are not compatible. ❂ 4. Expandability: Can I add RAM , can I add Can 23 modem cards / Video cards ... ❂ 1. Cost: Summer 2004 ...
View Full Document

This note was uploaded on 11/04/2009 for the course SSE CSC 1400 taught by Professor Mhamdi during the Spring '09 term at Al Akhawayn University.

Ask a homework question - tutors are online