Central Processing Unit

  • Uploaded by: nirajkumar26
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Central Processing Unit as PDF for free.

More details

  • Words: 1,135
  • Pages: 35
Central Processing Unit

Learning Objectives When you complete this chapter, you will: state the functions and basic units of a central processing unit, explain how instructions are picked up and executed by the CPU, be aware that all the information inside the computer is stored and processed in binary codes.

Chapter 12. Central Processing Unit 12.1 Central Processing Unit 12.2 Functions of Different Units 12.3 Data Representation in Computer

12.1 Central Processing Unit

12.1 Central Processing Unit

Central Processing Unit Central Processing Unit is the core component of a computer. It executes user’s instructions and processes calculations. Like the chief commander of an army, the CPU controls and co-ordinates various devices in the computer system. Without the CPU, the devices cannot work together and so the computer cannot function.

12.1 Central Processing Unit

Central Processing Unit CPU is often etched on a chip and is usually called a microprocessor.

Cyrix III

Intel Pentium III

Intel Pentium 4

AMD Athlon XP

12.2 Functions of Different Units

12.2 Functions of Different Units

Functions of Different Units A CPU consists of two basic units: Control unit Some registers

Arithmetic and logic unit

12.2 Functions of Different Units

Control Unit The control unit executes the instructions, sends control signals to and receive control signals from peripheral devices. In other words, it controls the whole computer, and directs the entire system to carry out instructions.

12.2 Functions of Different Units

Arithmetic and Logic Unit Arithmetic unit Arithmetic and Logic Unit

handles arithmetic calculations

Logic unit performs logical calculations and makes judgement like “if A > B is true”.

12.2 Functions of Different Units

Registers When the control unit and the arithmetic and logic unit operate, they store the information and instruction temporarily in registers.

12.2 Functions of Different Units

Program Executions Before a computer executes instructions, they are first placed in the The memory. diagram shows how the CPU executes an main instruction: Control unit Decode

Arithmetic and logic unit Execute

Main memory Fetch

This is called machine cycle.

12.2 Functions of Different Units

Program Executions Fetching

The control unit gets the next program instruction from the main memory.

Decoding

The control unit decodes what the instruction means.

12.2 Functions of Different Units

Program Executions Executing

The ALU executes arithmetic and logical instructions. It means that the ALU controls and performs the actual operation on the data.

12.3 Data Representation in Computer

12.3 Data Representation in Computer

Data Representation in Computer

Computers use the binary system to store and process information. • In the binary system, there are only numbers 0

and 1, which are called binary digits.

Music is stored as a sequence of 1s and 0s in the computer

12.3 Data Representation in Computer

Data Representation in Computer

All sorts of information, such as text, sound and graphics, can be stored as a sequence of binary digits (bit pattern).

12.3 Data Representation in Computer

Data Representation in Computer

Inside the computer, these binary digits are represented by two-state 0 represents an devices. 1 represents an electronic state of “OFF” or a signal with “no pulse”

electronic state of “ON” or a signal with a “pulse”

The binary digits (bit pattern) are represented by two electronic states in the comoputer

12.3 Data Representation in Computer

Data Representation in Computer

Inside the computer, these binary digits can also be represented by the following two-state device.

0 represents “OFF”

1 represents “ON”

12.3 Data Representation in Computer

Bit and Byte of Binary System In the binary system, different combinations of 0s and 1s represent different units such as bit and byte for data.

12.3 Data Representation in Computer

Bit and Byte of Binary System Bit

Each 0 and 1 in the binary system is called a bit. The bit is the basic unit for representing data in the computer memory. Byte Bits are put together in a group of eight to form a byte. 1 byte = 8 bits

12.3 Data Representation in Computer

Bit and Byte of Binary System In most computer systems, 1 byte memory is used to store an English Do you know character. the bit pattern representing H? The answer is 01001000

12.3 Data Representation in Computer

Coding Information with Two-state Device There are many examples of two-state devices in our everyday life. They can be used to demonstrate the binary digits. Two-state device

Binary digits 0

1

Off

On

Light bulb

12.3 Data Representation in Computer

Coding Information with Two-state Device There are many examples of two-state devices in our everyday life. They can be used to demonstrate the binary digits. Two-state device

Switch Coin

Binary digits 0

1

It’s On! If

12.3 Data Representation in Computer

represents 1 and

represents 0, then

two light bulbs can be used to represent four bits patterns.

Light bulbs

Bit pattern 0

0

0

1

1

0

1

1

It’s On! If

12.3 Data Representation in Computer

represents 1 and

represents 0, then

two light bulbs can be used to represent four bits patterns.

How many bit patterns can be shown by three light bulbs? List all these bit patterns. 000, 001 , 010 , 011 , 100 , 101 , 110 , 111 , 23 = 8

Binary

12.3 Data Representation in Computer

You can obtain the result of Class Activity 1 by trying the CAL program “Binary” from the Learning disc.

Click these switches alternately. The pattern found will be listed on the right.

12.3 Data Representation in Computer

Secret Message

In this activity, A to Z will be coded by 8 binary bits according to the following table.

12.3 Data Representation in Computer

Secret Message

Run the CAL program “Secret Message” from the Learning disc. Try to decode the messages from the computer Decode this message

Input your message here

The answer is displayed here

12.3 Data Representation in Computer

How Well Do You Know CPU? Test your knowledge of CPU by answering the following:

1. The CPU consists of two basic units: ___________________ and ______________________. control unit arithmetic and logic unit control unit 2. The entire computer system is controlled by ___________. 3. The three steps of the machine cycle are: __________, fetching __________ decoding and __________. executing

12.3 Data Representation in Computer

How Well Do You Know CPU? Test your knowledge of CPU by answering the following:

4. What is each ________ and ________ in the binary 0 1 system called? ________ bit 5. 1 byte = ________ 8 bits 6. How many bit patterns can be represented by 4 bits? ________ 16

Key Words

Key Words • control unit 控制部件 • arithmetic and logic unit 算術及邏輯運算部件 (ALU) • register 寄存器 • machine cycle 機器周期 • fetching 取碼 • decoding 譯碼 • executing 執行 • binary digit 二進制數字 • bit pattern 位元樣式

Key Words • bit • byte

位元 字節

*** The End ***

Related Documents


More Documents from "Arpita"

Unit1 1(pgdm It 1)
June 2020 0
Letter Writing 2
June 2020 2