1 / 71

Chapter 2 Processing Data

Chapter 2 Processing Data. Dept. of Computer Engineering Khon Kaen University. 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

lauraward
Download Presentation

Chapter 2 Processing Data

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. 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. 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 How a Computer Represents Data

  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

  8. Number Base Systems (Cont.)

  9. Number Base Systems (Cont.)

  10. Number Base Systems (Cont.)

  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

  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

  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

  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. 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.

  26. 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

  27. 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

  28. Arithmetic Operations

  29. Logical Operations

  30. 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

  31. Memory (Cont.)

  32. 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

  33. 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

  34. RAM Chips

  35. 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

  36. 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

  37. 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

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

  39. 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

  40. 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

  41. Devices Affecting Processing Speed

  42. 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

  43. 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

  44. 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

  45. 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

  46. 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

  47. 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)

More Related