17
15th October 15th October 1 LECTURE # 3: LECTURE # 3: TRANSFORMING DATA INTO TRANSFORMING DATA INTO INFORMATION INFORMATION Why computers use Why computers use the binary number the binary number system. system. Main parts of the Main parts of the CPU and how they CPU and how they work together. work together. The difference The difference between RAM and ROM. between RAM and ROM. Connections that are Connections that are used to attach used to attach devices to a PC. devices to a PC.

Computer Lecture 3

Embed Size (px)

Citation preview

Page 1: Computer  Lecture 3

15th October15th October 11

LECTURE # 3:LECTURE # 3:

TRANSFORMING DATA INTO TRANSFORMING DATA INTO INFORMATIONINFORMATION

Why computers use the Why computers use the binary number system. binary number system.

Main parts of the CPU Main parts of the CPU and how they work and how they work together.together.

The difference between The difference between RAM and ROM.RAM and ROM.

Connections that are Connections that are used to attach devices to used to attach devices to a PC.a PC.

Page 2: Computer  Lecture 3

15th October15th October 22

HOW COMPUTERS REPRESENT HOW COMPUTERS REPRESENT DATADATA

Binary NumbersBinary Numbers The Binary Number SystemThe Binary Number System Bits and BytesBits and Bytes Text CodesText Codes

Page 3: Computer  Lecture 3

15th October15th October 33

BINARY NUMBERSBINARY NUMBERS

Computer processing is performed by transistors, which Computer processing is performed by transistors, which are switches with only two possible states: on and off.are switches with only two possible states: on and off.

All computer data is converted to a series of binary All computer data is converted to a series of binary numbers– 1 and 0. For example, you see a sentence as numbers– 1 and 0. For example, you see a sentence as a collection of letters, but the computer sees each letter a collection of letters, but the computer sees each letter as a collection of 1s as a collection of 1s and 0s.and 0s.

If a transistor is assigned a value of 1, it is on. If it has a If a transistor is assigned a value of 1, it is on. If it has a value of 0, it is off. A computer's transistors can be value of 0, it is off. A computer's transistors can be switched on and off millions of times each second.switched on and off millions of times each second.

Page 4: Computer  Lecture 3

15th October15th October 44

Page 5: Computer  Lecture 3

15th October15th October 55

THE BINARY NUMBER SYSTEMTHE BINARY NUMBER SYSTEM

To convert data into strings of To convert data into strings of numbers, computers use the numbers, computers use the binary number system.binary number system.

Humans use the decimal Humans use the decimal system (“deci”stands for “ten”). system (“deci”stands for “ten”).

The binary number system The binary number system works the same way as the works the same way as the decimal system, but has only decimal system, but has only two available symbols (0 and two available symbols (0 and 1) rather than ten (0, 1, 2, 3, 4, 1) rather than ten (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9).5, 6, 7, 8, and 9).

Base Base 1010

Base Base 22

00 00

11 11

22 1010

33 1111

44 100100

55 101101

66 110110

77 111111

88 10001000

99 10011001

1010 10101010

Page 6: Computer  Lecture 3

15th October15th October 66

BITS AND BYTESBITS AND BYTES

A single unit of data is called a bit, having a value of 1 or 0. A single unit of data is called a bit, having a value of 1 or 0.

Computers work with collections of bits, grouping them to Computers work with collections of bits, grouping them to represent larger pieces of data, such as letters of the represent larger pieces of data, such as letters of the alphabet.alphabet.

Eight bits make up one byte. A byte is the amount of Eight bits make up one byte. A byte is the amount of memory memory needed to store one alphanumeric character.needed to store one alphanumeric character.

With one byte, the computer can represent one of 256 With one byte, the computer can represent one of 256 different symbols or characters. different symbols or characters.

Page 7: Computer  Lecture 3

15th October15th October 77

1 0 1 1 0 0 1 01 0 0 1 0 0 1 01 0 0 1 0 0 1 11 1 1 1 1 1 1 1

Page 8: Computer  Lecture 3

15th October15th October 88

WHERE PROCESSING OCCURSWHERE PROCESSING OCCURS

Processing takes place in the PC's central processing Processing takes place in the PC's central processing unit (CPU).unit (CPU).

The system's memory also plays a crucial role in The system's memory also plays a crucial role in processing data.processing data.

Both the CPU and memory are attached to the system's Both the CPU and memory are attached to the system's motherboard, which connects all the computer's devices motherboard, which connects all the computer's devices

together, enabling them to communicate.together, enabling them to communicate.

Page 9: Computer  Lecture 3

15th October15th October 99

Page 10: Computer  Lecture 3

15th October15th October 1010

THE CONTROL UNITTHE CONTROL UNIT

The two main parts of a CPU are the control unit and the The two main parts of a CPU are the control unit and the arithmetic logic unit (ALU)arithmetic logic unit (ALU)

The control unit directs the flow of data through the CPU, The control unit directs the flow of data through the CPU, and to and from other devices.and to and from other devices.

The control unit stores the CPU's microcode, which The control unit stores the CPU's microcode, which contains the instructions for all the tasks the CPU can contains the instructions for all the tasks the CPU can perform.perform.

Page 11: Computer  Lecture 3

15th October15th October 1111

Page 12: Computer  Lecture 3

15th October15th October 1212

THE ARITHMETIC LOGIC UNITTHE ARITHMETIC LOGIC UNIT

The actual manipulation of data takes place in the ALU.The actual manipulation of data takes place in the ALU.

The ALU can perform arithmetic and logic operations.The ALU can perform arithmetic and logic operations.

The ALU is connected to a set of registers—small The ALU is connected to a set of registers—small memory areas in the CPU, which hold data and program memory areas in the CPU, which hold data and program instructions while they are being processed. instructions while they are being processed.

Page 13: Computer  Lecture 3

15th October15th October 1313

THE ROLE OF MEMORYTHE ROLE OF MEMORY

RAM stores data and program code needed by the CPU. RAM stores data and program code needed by the CPU. The contents of RAM change rapidly and often. The contents of RAM change rapidly and often.

Read-only memory (ROM) is nonvolatile (or permanent). Read-only memory (ROM) is nonvolatile (or permanent). It holds instructions that run the computer when the It holds instructions that run the computer when the power is first turned on.power is first turned on.

The CPU accesses each location in memory by using a The CPU accesses each location in memory by using a unique number, called the memory address. unique number, called the memory address.

Page 14: Computer  Lecture 3

15th October15th October 1414

Page 15: Computer  Lecture 3

15th October15th October 1515

Page 16: Computer  Lecture 3

15th October15th October 1616

CACHE MEMORYCACHE MEMORY

Cache memory is high-speed memory that holds the Cache memory is high-speed memory that holds the most recent data and instructions that have been loaded most recent data and instructions that have been loaded by the CPU.by the CPU.

Cache is located directly on the CPU or between the Cache is located directly on the CPU or between the CPU and RAM, making it faster than normal RAM.CPU and RAM, making it faster than normal RAM.

CPU-resident cache is called Level-1 (L1) cache. CPU-resident cache is called Level-1 (L1) cache. External cache is called Level-2 (L2) cache.External cache is called Level-2 (L2) cache.

The amount of cache memory has a tremendous impact The amount of cache memory has a tremendous impact on the computer's speed. on the computer's speed.

Page 17: Computer  Lecture 3

15th October15th October 1717