Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Processing Data Dept. of Computer Engineering Khon Kaen University.

Similar presentations


Presentation on theme: "Chapter 2 Processing Data Dept. of Computer Engineering Khon Kaen University."— Presentation transcript:

1 Chapter 2 Processing Data Dept. of Computer Engineering Khon Kaen University

2 Major Concepts Data vs. information Why a computer uses the binary number How a computer processes data CPU Memory Factors that affect processing speed CPUs used in modern personal computers Connecting to external devices

3 Data  Information Computer devices can only recognize two distinct states produced by electricity, magnetic polarity, or reflected light All they can understand: on or off The CPU consists of several millions tiny electronic switches called transistors. In the strictest sense, data consists of raw numbers that computer programs turn this data into useful information

4 How a Computer Represents Data To a computer, everything is a number Represented as 0 0000 0000 1 0000 0001 2 0000 0010 3 0000 0011 For computer, the word “are” is represented by Represented as a 0110 0001 r 0111 0010 e 0110 0101

5 Number Bases A number base is a specific collection of symbols on which a number system can be built The number base familiar to us is base 10, upon which the decimal number is built. There are ten symbols, 0 through 9 What do we do to represent a number greater than 9? Each symbol in a number is called a digit

6 Number Bases (Cont.) Besides base 10 (the decimal number), other number systems are The binary number system: base 2 Numbers: 0, 1 The octal number system: base 8 Numbers: 0, 1, 2, 3, 4, 5, 6, 7 The hexadecimal number system: base 16 Numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f

7 Number Base Systems Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) 000011 100122 201033 301144 410055

8 Number Base Systems (Cont.) Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) 10101012a 11101113b 12110014c 13110115d 14111016e

9 Number Base Systems (Cont.) Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) 10101012a 11101113b 12110014c 13110115d 14111016e

10 Number Base Systems (Cont.) Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) 16100002010 17100012111 18100102212 19100112313 20101002414

11 Major Concepts Data vs. information Why a computer uses the binary number How a computer processes data CPU Memory Factors that affect processing speed CPUs used in modern personal computers Connecting to external devices

12 Numbers in a Computer In a computer, all data must be reduced to electrical switches A switch has only two states – “ON” or “OFF” It has only two numeric symbols 0 stands for “OFF” and 1 stands for “ON” Computers function in a binary number system (base 2) When a computer needs to represent a quantity greater than 1, it uses more than one digit

13 Bits and Bytes When referring to computerized data, each switch – whether on or off – is called bit The term bit is a contraction of binary digit A bit is the smallest possible unit of data To represent anything meaningful – that is to convey information The computer needs groups of bits The larger unit of data is byte, which is a group of 8 bits

14 Bytes With one byte (8 binary digits), the computer can represent up to 256 different values 0 to 255 One byte combination is an enough unit to represent all the English characters on the keyboard Including all letters (uppercase and lowercase), numbers, punctuation marks, and other symbols

15 Text Codes The programmers need a standard code which is a group of numbers to represent or standard for letters of the alphabets, punctuation marks, and other symbols Three of the most popular systems are EBCDIC ASCII Unicode

16 EBCDIC EBCDIC: Extended Binary Coded Decimal Interchange Code EBCDIC was defined by IBM Eight-bit code can define 256 symbols Used in IBM mainframe and mid-range systems Rarely encountered in personal computers because EBCDIC makes the coding difficult and miss some characters, such as []\

17 EBCDIC Characters CodeDecBinaryCodeDecBinary A1931100 0001a1291000 0001 I2011100 1001i1371000 1001 J2091101 0001j1451001 0001 R2171101 1001r1531001 S2261110 0010s1621010 0010 T2271100 0011t1631010 0011

18 ASCII American Standard Code for Information Interchange ASCII is the seven bits code Specify characters up to 127 ASCII is the most common character set It is easy to write code to manipulate upper/lowercase letters It is also easy to check for valid data ranges

19 ASCII Characters CodeDecBinaryCodeDecBinary A650100 0001a970110 0001 I730100 1001i1050110 1001 J740100 1010j1060110 1010 R820101 0010r1140111 0010 S830101 0011s1150111 0011 T840101 0100t1160111 0100

20 UNICODE UNICODE provides a unique number for every character No matter what the platform, the program, and the language UNICODE represents each symbol by two bytes – 16 bits (represents up to 65536) The UNICODE standard has been adopted by several industry leaders and is required by modern standards, such as XML

21 UNICODE Characters CodeHexCodeHexCodeHex ก 0E01a0061A0041 ข 0E02b0062B0042 ฃ 0E03c0063C0043 ค 0E04d0064D0044 ฅ 0E05e0065E0045 ฆ 0E06f0066F0046

22 Major Concepts Data vs. information Why a computer uses the binary number How a computer processes data CPU Memory Factors that affect processing speed CPUs used in modern personal computers Connecting to external devices

23 How a Computer Processes Data There are two components which handle processing data The central processing unit, or CPU The memory Both components are located on the computer main system board (mother board)

24 The CPU The CPU is the brain of the computer, where data is manipulated In a microcomputer, the entire CPU is contained on a tiny chip called microprocessor The chip has at least two basic parts The control unit The arithmetic logic unit

25

26 The Control Unit The CPU’s instructions for carrying out commands are built into the control unit Each instruction in the instruction set is expressed in microcode- a series of basic directions that tell the CPU how to execute more complex operations The control unit dictates how and when each specific instruction is to be performed.

27 The Arithmetic Logic Unit (ALU) Since all computer data is stored as numbers, the computer needs a unit that carries out mathematic operations The ALU can perform two types of operations Arithmetic operations Logical operations

28 The ALU (Cont.) When the control unit encounters an instruction that involves arithmetic or logic, it passes that instruction to the ALU The ALU includes a group of registers What is a register? A high speed memory built directly inside the CPU Hold the data currently being processed

29 Arithmetic Operations SymbolOperations +Add -Subtract xMultiply /Divide ^Raise by a power

30 Logical Operations SymbolOperations =Equal <>, !=Not equal >Greater than >=Greater than or equal <Less than <=Less than or equal ~, !Not

31 Memory The CPU cannot store large sets of data or entire programs permanently The CPU has only small space of its memory (registers) The CPU needs millions of bytes of memory for holding programs and data being manipulated The CPU needs memory (an electronic chip) Two types of built-in memory Permanent – nonvolatile Non-permanent – volatile

32 Memory (Cont.)

33 ROM ROM stands for Read-Only Memory The computer users can only read data but cannot write data into the memory ROM: nonvolatile memory chips When a computer is turned off, the content of the memory is still there Many kinds of ROM EPROM: Erasable-Programmable ROM EEPROM: Electrically EPROM

34 RAM RAM stands for Random-Access Memory Data can be read and changed by computer users RAM is volatile When a computer is turned off, the memory content disappears RAM consists of some chips on a small circuit board

35 RAM Chips

36 RAM Technologies Fast Page Mode (FPM) RAM: the oldest Extended Data Output (EDO) RAM: faster than FPM Burst Extended Data Output (BEDO) RAM: fast, but can be used in a specific computer brand Synchronous Dynamic RAM (SDRAM): fast and used in modern CPUs

37 RAM Technologies (Cont.) Double Data-Rate Synchronous RAM (DDR SDRAM or DDR): The fastest Memory chips are usually grouped together on small circuit boards Single In-line Memory Module (SIMM) Double In-line Memory Module (DIMM) SIMMs have a row of memory on one side of the board, but DIMMs have a row of memory on both sides of the board

38 Accessing the Data in Memory The CPU stores and retrieves each piece of data using memory address Memory address is a number indicates a location on the memory chips Memory addresses start at zero and go up to one less than the number of bytes of memory

39 Memory Access To request a byte of data, the CPU sends a memory address to RAM

40 Major Concepts Data vs. information Why a computer uses the binary number How a computer processes data CPU Memory Factors that affect processing speed CPUs used in modern personal computers Connecting to external devices

41 Factors Affecting Processing Speed Computing power of the computer: the speed with which the computer processes data Several reasons that the computer speed increases The less distance between transistors inside CPU The faster CPU’s register The more powerful memory and the cache memory The faster clock speed The wider data bus The faster math coprocessor

42 Devices Affecting Processing Speed

43 How Registers Affect Speed The size of the registers, called word size, indicates the amount of data with which the computer can work at any given time The bigger word size, the more quickly the computer can process a set of data When we refer to 32-bit processor or 64- bit processor, we usually refer to the size of the register inside the processor chip

44 Memory and Computing Power The amount of RAM in a computer can have a profound effect on the computer’s power More RAM means the computer can use bigger, more powerful programs, and can access larger data files

45

46 The Computer Clock Speed Every microcomputer has a system clock to time its processing operation Clocks speeds has increased steadily First PC operated at 4.77 megahertz Nowadays PC operated at 2 gigahertz Hertz is a measure of cycles per second Megahertz (MHz) means millions of cycles per second A CPU operating at 300 MHz can process data more than twice as fast as the same one operating at 133 MHz

47 The Bus The bus refers to the electrical paths between the components of a group of parallel wires There are two types of bus The data bus The address bus

48 The Data Bus The bus for carrying data The number of wires in the bus affects the speed at which data can travel between components Each wire can transfer one bit at a time Bus Standards Industry Standard Architecture (ISA) bus: 16-bit bus Peripheral Component Interconnect (PCI) bus: 32-bit and 64-bit bus

49 The Address Bus The address bus is a set of wires that connects the CPU and RAM and carries the memory address The number of wires in address bus determines the maximum number of memory addresses Today most CPUs have 32-bit address buses that can address up to 2^32 (4 Gigabytes of RAM)

50

51

52

53 Cache Memory Cache memory is similar to RAM, but it is extremely fast compared to normal memory The cache speeds up processing by storing frequently used data or instructions in its high-speed memory We need cache because the speed of RAM is much slower than the speed of CPU

54

55 The Math Coprocessor A special chip designed to handle complicated mathematical operations The ALU in CPU is designed to manipulate whole numbers that are not too large or not too small. If ALU is forced to work with decimals, it can really get boggled and slow down

56 The Math Coprocessor (Cont.) The math coprocessor is a processing specialist designed to work with numbers that are very small or very large It uses floating-point arithmetic techniques that translate numbers into the scientific notation 0.0000586  5.86 x 10 -5 128610000000  1.2861 x 10 11

57 Major Concepts Data vs. information Why a computer uses the binary number How a computer processes data CPU Memory Factors that affect processing speed CPUs used in modern personal computers Connecting to external devices

58 The Intel Processor NameDateTransistorsClock speed 803861985275,00016 MHz 8048619891,200,00025 MHz Pentium19933,100,00060 MHz Pentium II19977,500,000233 MHz Pentium III19999,500,000450 MHz Pentium 4200042,000,0001.5 GHz

59 Advanced Micro Devices (AMD) Chips of AMD 5x86  Pentium 75 MHz AMD K5  Pentium 133 to 166 MHz AMD K6  Pentium MMX 166 to 400 MHz AMD Althlon 64: 64-bit processor AMD Althlon XP: for Microsoft Windows XP AMD Althlon XP-M: Mobile AMD Althlon XP AMD chips are usually cheaper than Intel’s but produce more heat.

60 CISC vs. RISC Intel 80x86 are complex instruction set computing (CISC) processors The instruction sets for these CPUs are large – 200 to 300 instructions RISC (Reduced Instruction Set Computing) processor Each instruction is small and simple Has been the engine of mid-size computers such as the IBM RS/6000, and high-end UNIX workstations built by SUN Microsystems

61 Parallel Processing A computer with more than one processor Produce faster data processing The dual-processor and quad-processor versions of PCs are available today Windows NT/2000 operating systems can make use of parallel processor computer The IBM 3090 has two to four processors The Cray X MP 4 has four processors

62 Parallel Processing (Cont.) In parallel processing, multiple processors are used in a single system, enabling them to share processing tasks. In a massively parallel processor (MPP) system, many processors are used. Some MPP systems utilize thousands of processors simultaneously

63 Major Concepts Data vs. information Why a computer uses the binary number How a computer processes data CPU Memory Factors that affect processing speed CPUs used in modern personal computers Connecting to external devices

64 Connecting to External Devices Extending the processor’s power to other devices Ports Expansion slots and boards

65 Ports External devices—such as those used for input and output—are connected to the system by ports on the back of the computer. PCs feature a number of built-in ports, which are ready to accept devices such as a printer, mouse, keyboard, phone line, microphone and speakers, and others. Most computers come with a serial port and a parallel port

66 A Serial Port Transmits one bit of data at a time

67 A Parallel Port Transmits data one byte at a time

68 SCSI Small Computer System Interface Install the SCSCI Adapter in the slot Extending the bus to multiple devices (up to 127 devices) through a single port The newest SCSI standard, Ultra3 SCSI, supports a 32-bit bus and can transfer data at a rate 160 Mbps

69

70 Expansion Slots and Boards If the PC does not have a port for an external device, you can install an expansion board into one of the empty expansion slots. Newer bus technologies such as Universal Serial Bus (USB) and IEEE 1394 enable many devices to be connected to one port. Advantages of USB: No need of slot and no need of opening the computer case

71


Download ppt "Chapter 2 Processing Data Dept. of Computer Engineering Khon Kaen University."

Similar presentations


Ads by Google