1 / 50

Computer Science Unit 1 Module 1

Computer Science Unit 1 Module 1. Hardware Components Input Output Processing. Group work Input Output Research paper. Due date ? Available on it4sac.pbworks.com. Input Devices. An input device is any peripheral device that allows one to enter data or instructions into a computer.

ira
Download Presentation

Computer Science Unit 1 Module 1

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. Computer Science Unit 1 Module 1 Hardware Components Input Output Processing Presentation adapted from Portmore Community college

  2. Group workInput Output Research paper • Due date ? • Available on it4sac.pbworks.com Presentation adapted from Portmore Community college

  3. Input Devices • An input device is any peripheral device that allows one to enter data or instructions into a computer. List five input devices ? Presentation adapted from Portmore Community college

  4. Input • Input refers to the data and instructions entered into a computer for processing (often called data entry). • Additionally, input devices are used to transfer data and instructions to the computer. • Within society, the keyboard is the most commonly used input device; thus, good keyboarding skills are means of one operating efficiently. • Additionally, various pointing devices are used in society, for controlling the cursor, creating diagrams, or drawing images. • Special input devices like speech/voice recognition enables us to input data by talking, it is most beneficial for users with disabilities (without sight or functionalities of their hands). Presentation adapted from Portmore Community college

  5. Keeping Data Accurate • To avoid inaccurate data being entered within the computer for processing (prevent GIGO) • data entryinterfaces are consistent in design, from one screen to the next (layout of fields), and the cursor shows where the next keystroke will appear when typing. • various input forms are used. These input forms are also used to enable simplification of users entering data. Consequently, input forms may be of either human-readable or machine-readable. • however, even when well-convenience input forms are used, human errors can still occur when transcribing data to computer (transcription error –e.g. entering wrong characters) Presentation adapted from Portmore Community college

  6. Input forms • Before data can be manipulated within a computer it must be collected. Therefore, various forms are used to collect data; • which must be designed with clear and concise instructions for entering data. • The responses from a form are called human-readable documents, since data is manually entered from the prints. This method of data capture has to be double-entered by different persons, since an individual is prone to errors; computers will only accept the identical data. • As such, documents that contain the original form of data are called source documents, as they are used to verify data when they are in question –used to correct transcription error. Presentation adapted from Portmore Community college

  7. From used as input • A turnaround document is a machine readable document that has some information printed on it by a computer; however, such documents have informationadded humans. • A turn around document is one that is fed to the computer for analysis. This source data entry eliminates the need for transcriptions, thus eliminating errors to be made. • Examples: shaded answer sheets, utility bills (OCR), and bar codes, U.P.C., encoded cheques, among others. Presentation adapted from Portmore Community college

  8. Checks to prevent errors • An additional method of programming controls also aid the data entry process to be effective and efficient. That is,with the capability of checking data with the software, programs can conduct validity checks, as well as verification checks. • Validity checks- determine if the data entered is consistent and complete. • Example, a form that checks if all user information has been entered before moving on to store data. • Verification checks -tests if the data entered conforms to a particular format, boundary, or parameter, among others. • Example, checking if the data entered in a field that requires numbers, was actually a number Presentation adapted from Portmore Community college

  9. Input Summary • We consider any data or instructions that enter the computer’s memory space as input. • Due to the variety of fields of studies that exist today, there has been respective input devices for the entering of data for processing. • Popular input devices include: keyboard, mouse, stylus, digital camera, microphone, and scanner. Presentation adapted from Portmore Community college

  10. Computer Architecture & Organization • An output device is any peripheral device that conveys information to one or more individuals. List three output devices ? Presentation adapted from Portmore Community college

  11. Types of Output • Output is the process of translating data that are in machine-readable form to a form that human being can understand. Thus, the output device is the hardware that enables this communication with human and computer. • Output can be divided into output that is read and used by persons, as well as those that hold data for temporary or permanent storage. • Hardcopy–refers to output that can be held (tangible); usually refers to output on paper, in a more permanent form. • Softcopy–refers to a more transient form of output (intangible); usually it refers to output that are on screen or heard Presentation adapted from Portmore Community college

  12. Type of Output (Con’t) • Output is made more meaningful when it is in a correct state, and that it can be organized in reports, for example. • Consequently, the output that is required it dependent on the type of audience that which information ought to be given to. • Thus, the output from a printer may be used in office or schools for reports; likewise, an intercom is used to broadcast to audience Presentation adapted from Portmore Community college

  13. Type of printers • As noted, output may be in the form of a hardcopy and softcopy. The printer is used to produce this type of output. • However due to the respective industries that require hardcopy output, there are various types of printers. • Thus two types of printing mechanisms allow printers to be either impact printers and non-impact printers • impact–refers to printers that strike the papers to leave an impression of the information desired.. • Non-impact–refers to printers that use additional technology, such as laser or thermal heating, to give impressions of information as output. Presentation adapted from Portmore Community college

  14. Type of printers • Characters, lineand page printers. • Character printers–print one character at a time; some character printer prints from left to right and right to left (bidirectional) which speeds up the printing. • Line printers–uses special mechanism to print one line at a time; some will print typically a range of hundreds to thousands of lines per minute. • Page printers–use to print one page at a time; typically, these printers produce thousands of pages per minute. Presentation adapted from Portmore Community college

  15. Print quality • With respect to printing, we also consider the quality of print that is given. Thus there are various line of quality print: • typeset-quality print (gives letters that are fully formed e.g. magazines); • letter- quality print (gives fully formed characters e.g. businesses); • near-letter-quality print (composed of a series of dots or short lines); • standard-quality print (compressed character together to conserve on space e.g. cashiers). Presentation adapted from Portmore Community college

  16. Monitor • The monitor is the most common form of softcopy output device. The quality of an image is dependent on the resolution that is given by the monitor (a measure of the number of elements of a picture, or pixel on a monitor). • Apixel is the smallest increment of display that can be controlled. Thus, the more pixel the clearer and sharper the image on screen –dot per inch. • Other factors that affect the monitor is the refresh rate; the number of times a screen is scanned to maintain an image. • There are two kinds of monitors for viewing: cathode-ray tube and the flat-panel display (liquid crystal display) Presentation adapted from Portmore Community college

  17. Output Summary • We consider data that has been processed into a useable form as output. • Computer systems can generate several types of output, depending on the hardware and software being used –it may be printed, seen, or heard. • Popular output devices include: printer, speaker, and monitor. Presentation adapted from Portmore Community college

  18. Processor (CPU) • The processor is the electronic component that interprets and carries out instructions to operate the computer system (which resides on the motherboard).. Presentation adapted from Portmore Community college

  19. Processing • The system unit is a case that contains electronic components of the computer, which are used to process data. • Processors (CPU)contain a control unit and an arithmetic logic unit, that together performs processing. • The processor impacts on the computer overall computing power and manages most computing operations. Presentation adapted from Portmore Community college

  20. Central Processing Unit (CPU) The CPU is that part of the computer that decodes andexecutes instructions; it consist of the arithmetic/logical unit (ALU), control unit (CU)and registers. Presentation adapted from Portmore Community college

  21. Central Processing Unit (CPU) In microprocessors, the CPU is combined on a single chip; where as in large computers there is need for more than one CPUs due to the processing requirements. To avoid damaging the CPU fans and heat sinks (heat pipes are used in laptops) are used. Presentation adapted from Portmore Community college

  22. Types of CPU CPU History Presentation adapted from Portmore Community college

  23. Control Unit • The control unit is main controller of data flowing within as well as out of the computer system; its effectiveness is based on a synchronization of tasks. That is, controlling the occurrences of events through the use of electrical timing signals that are given by the system clock. Presentation adapted from Portmore Community college

  24. Parallel Processing • As such large computers will implement parallel processing – dividing a task among other processors, allowing it to be performed quickly. http://cell.fixstars.com/opencv/index.php/Optimization_Strategy Presentation adapted from Portmore Community college

  25. Semiconductor Technology • Semiconductor technology uses transistors to form electrical switches that can be either on or off. This is ideal since data representation is zero or one. • Combinations of these semiconductor switches areetchedtogether to produce an integrated circuit (microchip), which is then placed on a motherboard. Presentation adapted from Portmore Community college

  26. Bus • A bus is an electrical path for signals to flow from point to point in a circuit). • To function effectively the arithmetic/logical unit, control unit, and main memory all communicate via a bus. Presentation adapted from Portmore Community college

  27. Types of Bus • There are several types of buses, each classed according to its function: • Control bus –a unidirectional pathway used for all timing andcontrolling functions; signals sent on the control bus regulate what occurs on the following buses Presentation adapted from Portmore Community college

  28. Types of Bus • Address bus –a unidirectional pathway used to locate the storage position in memory, for the next instruction to be executed • Data bus –a bidirectional pathway where actual data transfer takes place e.g. 16, 32 bits etc. Presentation adapted from Portmore Community college

  29. Machine’s cycle • Depends on the systemclock, which controls the timing of computer operations (GHz;MIPS). • A machine’s cycle consist of four stages: fetching, decoding, executing, and storing (some computers perform one instruction per cycle). Presentation adapted from Portmore Community college

  30. Registers involved in the Fetch Execute Cycle • MAR -Memory Address Register • PC - Program Counter • Sequence Control Register • MBR -Memory Buffer Register • CIR - Current Instruction Register Presentation adapted from Portmore Community college

  31. Detail description • address of next instruction to be executed/fetched; • (contents of Program Counter) copied into Memory Address Register; • Contents of Program Counter incremented (by 1); • at the same time…; instruction/data held at that address is placed in the Memory Buffer Register; • Contents of Memory Buffer Register copied into Current Instruction Register; • Instruction held in Current Instruction Register is decoded; • If necessary data is fetched; • (and) instruction is executed by ALU; • Address sent/transferred over address bus; • Data/instruction transferred to processor on data bus; • Result stored in accumulator; Presentation adapted from Portmore Community college

  32. BUS usage • Address sent/transferred over address bus • Data/instruction transferred to processor on data bus Presentation adapted from Portmore Community college

  33. Transfer and Access Rate • Access rate - measures the amount of time taken by a storage deviceto retrieve an item on storage media as well as deliver item from memory to processor • Transfer rate - is the speed at which data, instructions and information move to an fro a device. Presentation adapted from Portmore Community college

  34. Word • Another important concept, with respect to processing is the term ‘word’ and ‘word size’. • A word is a fixed-sized group of bits that are handled together by the machine. • The amount of data transferred between the CPU and the memory is mostoften measured in terms of words. Presentation adapted from Portmore Community college

  35. Word Size • The word size is the number of bits a CPU can process at once; • word size is usually the same as the width of the CPU's external data bus, but sometimes is smaller. Example 8, 16, 32, and 64 bit word size are commonly used. Presentation adapted from Portmore Community college

  36. Instruction Set • The instruction set is a collection ofinstructions each representing a CPU operation. In assembly language, the instructions are represented by the mnemonics and the operands (or their addresses) involved in the operation. Presentation adapted from Portmore Community college

  37. Categories of Instructions • Data manipulation • Data transfer • Program manipulation Presentation adapted from Portmore Community college

  38. Data manipulation • Arithmetic manipulation: add, sub, mult, div • Logic and bit manipulation:and, or, nor, xor • Shift and rotation (to right or left): sll, srl, sra, rol, ror • Note: Instruction srl (shift right logical) is used to shift a 0 into the vacated bit (the sign bit), while instruction sra is used to (shift right arithmetic) repeat the sign bit (sign extension for signed 2's complement). Presentation adapted from Portmore Community college

  39. Data transfer • transfer data between MM and CPU: lw (load word), la (load address), lb (load byte), sw (store word), sb (store byte). • transfer data between registers: move, mfhi, mflo, mthi, mtlo, Presentation adapted from Portmore Community college

  40. Program control • branch to instruction other than the one following the current one conditionally or unconditionally (based on comparison between two operands or between oneoperand and zero) b, beq, bne, bgt, blt, bge, ble, beqz, bnez, bgez, bgtz, • jump to different segments of the program (functions, subroutines, among others.) j, jal, jalr, jr, among others. Presentation adapted from Portmore Community college

  41. Instruction Format The opcode is a short code which indicates what operation is expected to be performed. Each operation has a unique opcode. The operand(s) indicate where the data required for the operation can be found and how it can be accessed. Presentation adapted from Portmore Community college

  42. Instruction Format The operand field may have the following formats: 1) zero-address 2) one-address 3) two-address 4) three-address Presentation adapted from Portmore Community college

  43. Instruction Format Opcode Opcode address zero-address one-address two-address three-address Opcode address address Opcode address addressaddress Presentation adapted from Portmore Community college

  44. Instruction FormatE.g. 1-address format • Example: X=(A+B)*(C+D) LOAD A ADD B STORE T LOAD C ADD D MUL T STORE X Note: One implied address: the accumulator register Presentation adapted from Portmore Community college

  45. Instruction FormatE.g. 2-address format • Example: X=(A+B)*(C+D) MOV R1 A ADD R1 B MOV R2 C ADD R2 D MUL R2 R1 MOV X R2 Note the First operand also stores result Presentation adapted from Portmore Community college

  46. Instruction FormatE.g. 3-address format • Op-field: specifies the operation to be performed; Address-field: provides operands or the CPU register with addresses of the operands. • Example: X=(A+B)*(C+D) • Where A, B, C, D and X are five main memory locations representing five variables; ADD R1 A B ADD R2 C D MUL X R1 R2 Presentation adapted from Portmore Community college

  47. Addressing mode • Immediate addressing • Direct addressing • Indirect addressing Presentation adapted from Portmore Community college

  48. Addressing modeImmediate addressing • With immediate addressing, the data required for execution of the instruction is located directly within the operands of the instruction itself. No lookup of data from memory is required. • Click for more on immediate addressing Presentation adapted from Portmore Community college

  49. Addressing modeDirect addressing • With Direct addressing the operands of the instruction hold the address of the location in memory where the data required can be found. The data is then fetched from this location in order to allow the instruction to be executed. • Click for more on direct addressing Presentation adapted from Portmore Community college

  50. Addressing modeIndirect addressing • With Indirect addressing the memory address given in the operands of the instruction is not the location of the actual data required. Instead, that address holds a further address, at which the data is stored • Click for more on indirect addressing Presentation adapted from Portmore Community college

More Related