1 / 47

Computer Hardware and Information Representation

stewart
Download Presentation

Computer Hardware and Information Representation

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. 1 Computer Hardware and Information Representation

    2. 2 The System Unit Bay - a shelf or opening used for the installation of electronic equipment System unit - houses the motherboard, power supply, and storage devices Case - empty box with just power supply FACTOID: A bay which is open to the outside of the PC is termed “accessible” or “exposed.” A bay which is closed inside the PC case is termed “hidden” or “internal.” FACTOID: A bay which is open to the outside of the PC is termed “accessible” or “exposed.” A bay which is closed inside the PC case is termed “hidden” or “internal.”

    3. 3 Computer Architecture

    4. 4 Flow of Information The parts are connected to one another by a collection of wires called a bus

    5. Memory Memory is a collection of cells, each with a unique physical address for random (direct) access memory is divided into fixed-length units or words Information that is stored in memory cells is in binary coded format: Instructions that make up programs Data: text symbols, numbers, images, etc.

    6. 6 Information Representation The Binary System: Using On/Off Electrical States to Represent Data & Instructions The binary system has only two digits--0 and 1. Bit - binary digit Byte - group of 8 bits used to represent one character, digit, or other value

    7. 7 Representing Information with Bit Combinations To encode entities (e.g., symbols), we need to assign a unique number to each entity (e.g., social security number). Binary encoding means that we assign a unique combinations of bits to each object. One bit can be either 0 or 1. Therefore, one bit can represent only two things. To represent more than two things, we need multiple bits. Two bits can represent four things because there are four combinations of 0 and 1 that can be made from two bits: 00, 01, 10,11. If we want to represent more than four things, we need more than two bits. In general, 2n bits can represent 2n things because there are 2n combinations of 0 and 1 that can be made from n bits. Q: how many bits do we need to encode all the 37 people in the class?

    8. 8 Information Representation Kilobyte approx. 1000 bytes (actually 210 = 1024 bytes) Megabyte approx. 1,000,000 bytes (one million) Gigabyte approx. 1,000,000,000 bytes (one billion) Terabyte approx. 1 trillion bytes Petabyte approx. 1 quadrillion bytes FACTOIDs: The prefix “mega” in “megabyte” comes from the Greek word “megas” meaning “mighty” or “great.” The prefix “giga” in “gigabyte” comes from a Greek word meaning “giant.” The prefix “tera” in “terabyte” comes from a Greek word meaning “monster.” You might think that the largest unit of storage capacity is a petabyte, but in fact, there are also exabytes, zetabytes, and yottabytes. FACTOIDs: The prefix “mega” in “megabyte” comes from the Greek word “megas” meaning “mighty” or “great.” The prefix “giga” in “gigabyte” comes from a Greek word meaning “giant.” The prefix “tera” in “terabyte” comes from a Greek word meaning “monster.” You might think that the largest unit of storage capacity is a petabyte, but in fact, there are also exabytes, zetabytes, and yottabytes.

    9. 9 Representing Text and Symbols To represent a text document in digital form, we simply need to be able to represent every possible character that may appear. There are finite number of characters to represent. So the general approach for representing characters is to list them all and assign each a number (represented in binary). An encoding scheme is simply a list of characters and the codes used to represent each one. To represent symbols, computers must use a standard encoding scheme, so that the same symbols have the same codes across different computers. Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations

    10. 10 ASCII Encoding Scheme ASCII stands for American Standard Code for Information Interchange. The ASCII character set originally uses 8 bits to represent each character, allowing for 256 (or 28) unique characters. Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations

    11. 11 Representing Text and Symbols ASCII - the binary code most widely used with microcomputers EBCDIC - used with large computers Unicode - uses two bytes for each character rather than one Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations

    12. 12 The Parity Bit Even parity - sum of bits must come out even Ex: given code 01010101, the extended code is: 010101010 Ex: given code 01101101, the extended code is: 011011011 Odd parity - sum of bits must come out odd

    13. 13 Representing Numbers The binary number system Decimal is base 10: 0,1,2,3,4,5,6,7,8,9 Binary is base 2: 0,1 Any decimal number can be converted to binary by doing base conversion from base 10 to base 2. Any binary number can be converted to decimal by doing base conversion from base 2 to base 10.

    14. 14 Number base 10 - decimal 102 101 100 100’s 10’s 1’s 1 0 1 x 1 = 1 x10 = 0 x100 = 100 101

    15. 15 Number base 2 - binary 22 21 20 4’s 2’s 1’s 1 0 1 x 1 = 1 x 2 = 0 x 4 = 4 5

    16. 16 Binary Conversion - Examples

    17. 17 Binary Conversion - Examples

    18. 18 Hexadecimal Representation Hexadecimal (Hex) = Base 16 Hex digits: 0, 1, 2, …, 9, A, B, C, D, E, F

    19. 19 Hexadecimal Representation Hex can be used as a short hand for long binary strings Use one Hex digit to represent every group of 4 bits Start from the right and an go left grouping 4 bit sequences Add leading 0’s if the last group has less then 4 bits

    20. 20 Hexadecimal Representation What is Hex 4C8F in binary?

    21. 21 Representing Images as Bit maps Image is collection of dots (pixels) Pixel = “picture element” Black & white: one bit per pixel Color: each pixel represented by combination of green, red, blue in varying intensity, to form all colors. Three bytes per pixel: one byte (8 bits) for each color intensity, 0-255 value Usually each byte is represented in Hex D4 7F 59 ? red (D4), green (7F), blue (59) For example, D4 is binary 1101 0100 which is decimal value 212 Bit maps are not efficient 3 byte/pixel, for 1280 x 1024 pixels = several megabytes Image cannot be enlarged, since pixels get bigger and image gets grainy or “blocky” .GIF and .JPEG formats compress images

    22. 22 Image Formats GIF Graphics Interchange Format Developed by Compuserve (ISP) Stores only 256 colors Loses some picture quality but is simple and fast Common in computer action games JPEG (JPG) Joint Photographic Experts Group Stores differences between adjacent pixels, not absolute values Uses variable-length data (values take a minimum number of bits to store), uses only 5% of the space of bitmaps

    23. 23 Image Formats Vector Images Pixels are not mapped Equations for the lines and curves making up the image are stored Image is stored as the instructions for drawing the image Images are easily scaled Modern type fonts are vector images Used in computer aided design (CAD) systems for “blueprint” drawings Good for three-dimensional drawings Windows metafile (.wmf) or Visio (.vsd) Cannot produce photographic images

    24. 24 Types of Memory Types of memory chips: RAM ROM CMOS Flash Volatile - a term used to describe memory in which the contents are lost when the power goes off or is turned off.Volatile - a term used to describe memory in which the contents are lost when the power goes off or is turned off.

    25. 25 Types of Memory RAM - Random Access Memory, used to temporarily hold software instructions and data ROM - Read-Only Memory, which cannot be written on or erased by the computer user. Contains fixed start-up instructions CMOS - Complementary metal-oxide semiconductor; powered by a battery and thus doesn’t lose its contents when the power is off Flash - can be erased and reprogrammed more than once Read - to transfer data from an input source into the computer’s memory or CPU. Write - to transfer data from the computer’s CPU or memory to an output device. FACTOID: “Firmware” is a combination of software and the read-only storage hardware (such as ROM chips) on which it is recorded. Read - to transfer data from an input source into the computer’s memory or CPU. Write - to transfer data from the computer’s CPU or memory to an output device. FACTOID: “Firmware” is a combination of software and the read-only storage hardware (such as ROM chips) on which it is recorded.

    26. 26 Cache and Virtual Memory Cache - temporary storage for instructions and data that the processor is likely to use frequently, thus speeding up processing Level 1 (L1) cache - built into the microprocessor Level 2 (L2) cache - consists of RAM chips outside microprocessor Virtual memory - free hard-disk space used to extend the capacity of RAM Processor searches for data or instructions in the following order: L1 L2 RAM Virtual memoryProcessor searches for data or instructions in the following order: L1 L2 RAM Virtual memory

    27. 27 Other Methods of Speeding Up Processing Interleaving - a process in which the CPU alternates communication between two or more memory banks Bursting - a process in which the CPU grabs a block of information at a time, on the assumption that the next address requested will be sequential to the previous one Pipelining - division of large tasks into a series of smaller overlapping ones

    28. 28 CPU Arithmetic/Logic Unit (ALU) Performing basic arithmetic operations such as ADD, SUB, etc. Performing logical operations such as AND, OR, and NOT Performing data transfer operations such as MOVE, LOAD, and STORE Most modern ALUs have a small amount of special storage units called registers which usually store intermediate results of operations. Control unit is the organizing force in the computer There are two “special purpose” registers in the control unit The instruction register (IR) contains the instruction that is being executed The program counter (PC) contains the address of the next instruction to be executed

    29. 29 CPU

    30. 30 The Instruction-Execution Cycle When a program is executed, the binary-coded instructions are retrieved from memory one at a time, decoded by the control unit, and executed by the ALU. Initially, the memory address for the first instruction is in the program counter (PC). This tells the CPU were in memory to look for the start of the program. Each instruction goes through the Instruction-Execution cycle (also called Machine cycle). Examples of typical instructions:

    31. 31 The Instruction-Execution Cycle 1. Fetch the next instruction from memory A copy of the instruction is stored in the instruction register (IR) Program counter (PC) is updated to point to the next instruction in memory. 2. Decode the instruction Control unit decodes the instruction to determine what operation it represents (e.g., ADD, AND, OR, MOVE), and if it references some data in memory. 3. Get data if needed May require accessing the data part of memory to retrieve the data, or it may involve using an intermediate date stored in one of the registers. 4. Execute the instruction ALU performs the operation on the operands (data that was obtained in step 3).

    32. 32 Figure 5.3 The Fetch-Execute Cycle

    33. 33 Secondary Storage Devices Because most of main memory is volatile and limited, it is essential that there be other types of storage devices where programs and data can be stored when they are no longer being processed Secondary storage devices can be installed within the computer box at the factory or added later as needed Examples of secondary storage media: Magnetic tape Magnetic disk (hard disk or floppy disk) Optical disk (such as CD ROM or DVD ROM) Zip disks (a type of magnetic media) External flash memory

    34. Magnetic Tape The first truly mass auxiliary storage device was the magnetic tape drive A magnetic tape drive is an example of sequential storage device Tape must be rewound or fast-forwarded to get to get the correct block under the read/write head (similar to tapes used to record music) In contrast, magnetic disk drives are direct access devices.

    35. Magnetic Disks A read/write head travels across a spinning magnetic disk, retrieving or recording data Each disk surface is divided into sectors and tracks Example of disk addressing scheme: surface 3, sector 5, track 4

    36. Magnetic Disks When reading from or writing to disk, read/write moves forward and backward while the disk spins left or write. This positions the read/write head on the appropriate block. Measuring disk performance: Latency = ˝ the time it takes to make once revolution Seek time = the time it takes to move read/write head into position Access time = latency + seek time Usually measured in milliseconds (ms) or 1000th of a second

    37. 37 Compact Disks and DVD A CD drive uses a laser to read information stored optically on a plastic disk CD-ROM is Read-Only Memory DVD stands for Digital Versatile Disk DVD-ROM - for reading only DVD-R - for recording on once For rewriting many times: DVD-RW DVD-RAM DVD+RW

    38. 38 Optical Disks: CDs & DVDs FACTOID: Many people who have to travel often for work like to take along their laptop computers so that they can make good use of their time while flying in an airplane, waiting at airports, etc. The advent of DVD players in laptops made this an even more attractive alternative, as travelers could carry along a DVD movie for their own personal entertainment. More and more desktop and tower microcomputers are beginning to feature DVD players as well, which further blurs the distinction between a computer and a television. One company that has taken advantage of this increase in computer-based DVD players (accompanied by a similar increase in home-entertainment DVD players) is netflix.com This WWW-based business is an online substitute for a video rental store. Netflix members pay a fixed amount per month for as many movie DVDs as they can order, watch, and return (in prepaid mailing envelopes) to the company. FACTOID: Many people who have to travel often for work like to take along their laptop computers so that they can make good use of their time while flying in an airplane, waiting at airports, etc. The advent of DVD players in laptops made this an even more attractive alternative, as travelers could carry along a DVD movie for their own personal entertainment. More and more desktop and tower microcomputers are beginning to feature DVD players as well, which further blurs the distinction between a computer and a television. One company that has taken advantage of this increase in computer-based DVD players (accompanied by a similar increase in home-entertainment DVD players) is netflix.com This WWW-based business is an online substitute for a video rental store. Netflix members pay a fixed amount per month for as many movie DVDs as they can order, watch, and return (in prepaid mailing envelopes) to the company.

    39. 39 Future Developments in Processing Gordon Moore’s 1965 prediction was that the number of circuits on a silicon chip would keep doubling every 18 months. Gordon Moore in 2000: “The fact that chips are made of atoms has increasingly become a problem for us. In the next two or three generations, it may slow down to doubling every five years. People are predicting we will run out of gas in about 2020, and I don’t see how we get around that.”Gordon Moore’s 1965 prediction was that the number of circuits on a silicon chip would keep doubling every 18 months. Gordon Moore in 2000: “The fact that chips are made of atoms has increasingly become a problem for us. In the next two or three generations, it may slow down to doubling every five years. People are predicting we will run out of gas in about 2020, and I don’t see how we get around that.”

    40. 40 Ports & Cables Types of ports: Serial port Parallel port SCSI port USB port Dedicated port Infrared port

    41. 41 Ports & Cables Serial port - sends bits one at a time, one after another Used to connect a variety of “serial” devices Sometimes used to connect mouse or keyboard Parallel port - transmits 8 bits simultaneously Used most commonly for printers Also used for other “parallel” devices such as external hard drives, external CD drives, etc. Being practically replaced with faster technologies such as USB and Firewire. Parallel port is third from left on bottom of display. Parallel ports are faster than serial ports, but can transmit information efficiently only up to 15 feet.Parallel port is third from left on bottom of display. Parallel ports are faster than serial ports, but can transmit information efficiently only up to 15 feet.

    42. 42 Ports & Cables SCSI port - allows data to be transmitted in a “daisy chain” to up to 7 devices SCSI - Small Computer System Interface.SCSI - Small Computer System Interface.

    43. 43 Ports & Cables USB port - can theoretically connect up to 127 peripheral devices daisy-chained to one general-purpose port USB (Universal Serial Bus) Plug and Play - allows peripheral devices and expansion cards to be automatically configured while they are being installed.USB (Universal Serial Bus) Plug and Play - allows peripheral devices and expansion cards to be automatically configured while they are being installed.

    44. 44 Ports & Cables Dedicated port - special-purpose ports

    45. 45 Ports & Cables Infrared port - allows a computer to make a cableless connection with infrared-capable devices

    46. 46 Expandability: Buses & Cards Expansion slots- sockets on the motherboard into which you can plug expansion cards Expansion cards - circuit boards that provide more memory or that control peripheral devices

    47. 47 Expandability: Buses & Cards ISA bus - for ordinary low-speed uses; the most widely used expansion bus PCI bus - for higher-speed uses; used to connect graphics cards, sound cards, modems, and high-speed network cards AGP bus - for even higher speeds and 3D graphics ISA (Industry Standard Architecture) PCI (Peripheral Component Interconnect) AGP (Accelerated Graphics Port)ISA (Industry Standard Architecture) PCI (Peripheral Component Interconnect) AGP (Accelerated Graphics Port)

    48. 48 Expandability: Buses & Cards Graphics cards - for monitors Sound cards - for speakers and audio output Modem cards - for remote communication via phone lines Network interface cards - for remote communication via cable PC cards - for laptop computers Graphic card - converts signals from the computer into video signals that can be displayed as images on a monitor. Sound card - used to transmit digital sounds through speakers, microphones, and headsets. Network interface card - allows the transmission of data over a cable network. PC card - thin, credit-card size device used principally on laptop computers to expand capabilities.Graphic card - converts signals from the computer into video signals that can be displayed as images on a monitor. Sound card - used to transmit digital sounds through speakers, microphones, and headsets. Network interface card - allows the transmission of data over a cable network. PC card - thin, credit-card size device used principally on laptop computers to expand capabilities.

More Related