1 / 81

Digital Technology and Computer Fundamentals

Digital Technology and Computer Fundamentals. Chapter 5 Computer Organization. Objectives. At the end of this chapter, you should be able to: describe the basic units of a computer system; describe the stored program concept in computer system;

Download Presentation

Digital Technology and Computer Fundamentals

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Technology and Computer Fundamentals Chapter 5 Computer Organization

  2. Objectives • At the end of this chapter, you should be able to: • describe the basic units of a computer system; • describe the stored program concept in computer system; • describe the functions of each component in a CPU;

  3. Objectives (Cont’d) • describe the instruction execution process: fetch cycle and execution cycle; • distinguish the different categories of memory; • describe the operations of a memory; • describe the organization of a memory; and

  4. Objectives (Cont’d) • describe the principles of operations of the different secondary storage devices.

  5. References • M. Marris Mano, "Computer System Architecture," third edition, Prentice Hall. • V. Carl Hamacher, Zvonko G. Vranesic, Safwat G. Zaky, "Computer Organization," McGraw-Hill, 3rd ed. 1990. • Andrew S. Tanenbaum, "Structured Computer Organization," 3rd ed. Prentice Hall, 1990.

  6. References • Herman Lam, John O'Malley, "Fundamentals of Computer Engineering,” Wiley, 1988. • G. Shelly, T. Cashman, G. Waggoner, W. Waggoner, “Discovering Computers 98, A link to the Future,” International Thomson, 1998.

  7. General Principles • Digital computers are electronic machines capable of performing arithmetic and logical operations. • A typical microcomputer system consists of a Central Processing Unit (CPU), Main Memory, and Input / output devices. • They are connected by different buses.

  8. General Principles (Cont’d)

  9. General Principles (Cont’d) • The physical parts of the computer system are called hardware. • A computer performs different tasks under the command of programs. • A program is a sequence of instructions.

  10. General Principles (Cont’d) • A computer instruction is a binary code that specifies a sequence of micro-operations for the computer. • The instruction codes together with data are stored in memory. • The CPU reads each instruction from memory, decodes it, and executes it by issuing a sequence of micro-operations to different hardware components.

  11. Instruction • Every computer has its own unique instruction set. • Each instruction will be assigned a binary code, called the machine code, consisting of two parts, opcode and address.

  12. Instruction (Cont’d) • The specification of the operation to be performed by the instruction is called the operation code or the opcode. • The address part specifies the source or the destination of the operand.

  13. Instruction (Cont’d) • Every operation must have the opcode part, the address part is not always needed. • Consequently, it is unavoidable to have instructions of different lengths.

  14. Central Processing Unit • The function of the CPU is to execute programs stored in the main memory by fetching and decoding them, then executing them one after another.

  15. Components of CPU • A simplified CPU

  16. Timing and Control Unit • Responsible for synchronization of the system and generating control signals • Generates the clock signal. • Decoding an instruction • Providing a reset function to initialize the CPU along with other components in the microprocessor system.

  17. Arithmetic and Logic Unit (ALU) • Perform various arithmetic and logical operations. • Placing the results into the accumulator. • Changes the flags in the Processor Status Registers.

  18. Accumulator • Used extensively for data manipulations. • It is commonly used to store the operands and results of different operations

  19. Instruction Register (IR) • Controlled only by the Timing and Control Unit • A temporary store for an instruction transferred from the main memory. • When instructed, IR passes the instruction to the Timing and Control Unit for instruction decoding.

  20. Program Counter (PC) • Place to store the address information of the next instruction to be executed. • The content of the Program Counter is updated by the Timing and Control Unit after the instruction decoding.

  21. Stack Pointer (SP) • Stack is a special implementation of memories. (Last In First Out operation). • The Stack pointer (SP) contains the address of next free memory location.

  22. Stack Operations • Push: Data are stored in the location pointed to by the Stack Pointer. After the operation, the content of the SP will be incremented. • Pop: Content of the SP is decremented and the data in the memory location pointed by the SP will be retrieved.

  23. Processor Status Register (PSR) • Contains various bits of status information. • Common flags include: zero, carry, overflow, interrupt, and negative. • These flags are set or cleared by the various components in CPU, after an operation. • Programmers know from these flags the result of an operation.

  24. General Purpose Registers • Store temporary data, usually the result from an operation and will be used again in a later operation. • Fast storage, inside the CPU without selecting external chips. • Sometimes used for indexing purposes.

  25. Instruction fetch-execute cycle • The instruction cycle consists of the fetch cycle and the execute cycle. • The fetch cycle is identical for all instructions. • The execute cycle is different for different instructions.

  26. The fetch cycle • The address of the next instruction is stored in PC. • A Memory Data Register (MDR) resides in the CPU which holds data items for communication. • The address information to the memory is held in the Memory Address Register (MAR).

  27. The fetch cycle (Cont’d) • Fetching: • transfer of the address from the PC to MAR • generation of the READ control signal, • waiting for the memory to transfer the instruction or data into MDR.

  28. The fetch cycle (Cont’d) • The instruction code is then stored temporarily in IR for decoding. • After the instruction is decoded, the content of the program counter will be updated and the fetch cycle completes.

  29. The execute cycle • The CPU performs the different tasks according to the instruction. • Different resources will be required for different types of instructions. • At the end of the execute cycle, the contents of the Processor Status Register will be updated

  30. Semiconductor Memories • An integrated circuit capable of storing a binary number and recalling it when addressed or selected. • One of the storage devices used in computers. • Store either programs or data in a computer.

  31. Categorizing Memories • Based on the way a memory is accessed. • Time required to locate and access a memory is called access time.

  32. Categorizing Memories (Cont’d) • Random access devices: in which any location may be selected at random, equal access time for each location. • Sequential access devices:in which the locations are sequentially arranged, access time varies according to the location.

  33. Categorizing Memories (Cont’d) • Volatile devices: in which the data stored will be lost when power supply is off. • Non-volatile devices: in which the data stored will not be lost when power is off.

  34. Random access memory • Random Access Memory (RAM) is a read / write memory. • Random access and volatile device. • There are two basic types of RAM in use today, dynamic RAM and Static RAM.

  35. Dynamic RAM • Designed for high capacity, moderate speeds, and low power consumption. • Memory cells are charge-storage capacitors with driver transistors. • The presence or absence of charge in a capacitor interpreted as 1 or 0.

  36. Dynamic RAM (Cont’d) • The charge in a capacitor has tendency to discharge itself. • Required periodic charging to maintain the data stored - refreshing.

  37. Static RAM • Made of flip-flops and logic gates. • The two stable states in flip-flops represent binary values. • Do not require refreshing. • Low capacity, high power consumption and relatively high cost per unit storage.

  38. Read Only Memory (ROM) • Read only refers to the applications at the end user’s view. • Data is permanently programmed either at the time of manufacture or by the user prior to the memory being installed. • Non-volatile and random access. • Several types.

  39. Standard ROMs • Programmed by the manufacturer. • Users can only read the data or execute programs in the ROM. • Store certain standard applications for general user applications.

  40. Programmable ROMs (PROM) • Can be programmed permanently by the user or distributor using special equipment. • Only programmed once.

  41. Erasable Programmable ROMs (EPROM) • Can be programmed and erased by the user for many times. • Erasure is carried out by shining high intensity ultra-violet light through a special transparent window at the top of the memory IC. • Special device called EPROM writer is needed.

  42. Electrically Erasable Programmable ROMs (EEPROM) • Similar to EPROM. • User can erase a single bit electrically in one operation. • Operations require a special equipment.

  43. Memory Organization • Usually organized into N locations where N is generally some power of 2. • The content in each location is called a word. • Each word consists of same number of bits, word length. • Each word is assigned an address.

  44. Operations on a memory • Reading from a memory: retrieving data, and writing to a memory: storing data. • Assisted by two external circuits, the memory address register (MAR) and memory data register (MDR)

  45. MDR and MAR

  46. MDR and MAR (Cont’d) • In general, for an n-bit address information, a total of 2n locations can be addressed. • MAR consists of n binary devices, so that a total number of 2n words can be addressed. • The size of the MDR is the same as the word length.

  47. Reading a memory • Reading a memory location will usually not destroy or change the contents in the location - non-destructive read. • The address is placed in the MAR • Then a read signal is passed to the memory. • Data in the specified location will be passed to MDR.

  48. Writing a memory • The data is first placed in the MDR, and the address in the MAR. • Then a write signal is passed to the memory. • The memory will store the data in MDR into the specified location. • After the operation, the data originally stored in the location will be lost.

  49. Locality of Reference • References to memory at any given interval of time confined within a few localized areas in memory. • Over short interval, addresses generated by a typical program refer to a few localized areas of memory repeatedly. • Remainder of memory is accessed relatively infrequently.

  50. Cache Memory • Keeping the most frequently accessed instructions and data in fast small memory. • The average memory access time will be less. • Such a fast small memory is referred to as a cache memory.

More Related