Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions.

Similar presentations


Presentation on theme: "Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions."— Presentation transcript:

1 Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions. 4 Computer-peripheral communication.

2 The Central Processing Unit CPU ALU Regs. Control unit Main memory Bus

3 The Central Processing Unit 4 General-purpose registers - temporary holding places for data being manipulated by the CPU. 4 Cache memory (in memory hierarchy). 4 Bus - CPU/memory interface. 4 Machine instructions - data transfer, arithmetic/logic, and control. –Figure 2.2, Appendix C, Figure 2.3

4 The Stored-Program Concept 4 In early computing, the program is built into the control unit as a part of the machine. The user rewires the control unit to adapt different programs. 4 Instructions as bit patterns - a program and data can be coded and stored in main memory. A computer’s program can be changed merely by changing the contents of the computer’s memory instead of rewiring the control unit.

5 The Stored-Program Concept 4 The main concept of the stored-program is that both program and data are stored in main memory instead of data were stored in memory and programs were part of the control unit. 4 Machine instructions consists of two fields: op-code and operand. –Appendix C B0-- –A program example on page 88

6 The Stored-Program Concept CPU ALU Regs. Control unit Main memory Bus Program counter Instr. Reg. Address 00 FF Op-code operand

7 Program Execution 4 The machine cycle: – Fetch: retrieve the next instruction from memory and then increment the program counter. – Decode: decode the bit pattern in the instruction register. – Execute: perform action requested by the instruction in the instruction register.

8 Program Execution 4 Figure 2.7. 4 What happens to placing an address of data in the program counter? 4 Providing programs and data with a common appearance allows a program to fix another program (or even to modify itself).

9 Arithmetic/Logic Instructions 4 Logic operations - AND, OR, XOR,…. 4 Masking and bit map. –AND (11011111), OR (00100000), XOR (11111111) 4 Rotation and shift operations. –logic shift: fill the hole with a 0 –arithmetic shift (leave the sign bit unchanged) 4 Arithmetic operations - add, subtract,…

10 Computer-Peripheral Communication 4 Controllers handle communication between machine’s CPU and peripheral devices. 4 The controllers are often a stand-alone small computer, each with its own memory and CPU that performs a program to convert messages and data back and forth between machine and a peripheral device.

11 Computer-Peripheral Communication CPU Peripheral device Controller Main memory Controller Peripheral device Bus

12 Computer-Peripheral Communication 4 Direct memory access (DMA) - the ability of controllers which can access memory directly. 4 Buffering - a buffer is any location where one system leaves data to be picked up later by another. 4 Make good use of the computing resources of the CPU.

13 Computer-Peripheral Communication 4 von Neumann bottleneck - bit patterns move between CPU and memory, CPU and controllers, and controllers and memory. 4 Port - a location in memory through which information enters and leaves the machine. 4 Handshaking - the two-way communication that takes place between devices.

14 Computer-Peripheral Communication CPU Peripheral device Controller Main memory Bus Memory-mapped I/O

15 Computer-Peripheral Communication 4 Parallel communications. – Internal bus: rates measured in Mbps 4 Serial communication. –Telephone line: Kbps –Optic fiber: near Gbps

16 Other Architectures 4 The design of a machine’s language - complex instruction set Vs. reduced instruction set. 4 CISC. –Intel Pentium series –microprogram 4 RISC. –PowerPC series by Apple, IBM and Motorola – simplify CPU design while induce longer programs

17 Other Architectures 4 Pipelining - the throughput concept. 4 Multiprocessor machines - parallel processing. 4 SISD, SIMD, MIMD. 4 Load balancing and scaling in multiprocessor machines. 4 Artificial neural network.

18 Part II: Software 4 In part II, we focus on topics associated with software. In particular, we will investigate the discovery, representation, and communication of algorithms. 4 Operating systems and networks. 4 Algorithms. 4 Programming languages. 4 Software engineering.


Download ppt "Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions."

Similar presentations


Ads by Google