Input and Output Devices | O Level Computer Science 2210 & IGCSE Computer Science 0478 | Detailed Free Notes To Score An A Star (A*)
- The role of the CPU
- Central Processing Unit is the brain of the computer
- Some devices have it in the form of a microprocessor
- Sometimes, microprocessor has sensors and actuators installed as well, which makes it an embedded system to perform certain tasks.
- Computer processes instructions using the fetch-decode-execute-cycle
- Von Neumann computer architecture
- Fetch Stage
- Data is given to the computer through input devices
- Instructions and data are initially stored in the RAM (random access memory)
- Even a file opened from the hard drive has to first go through the RAM.
- For data to be processed, it must be taken from the RAM to the CPU
- Program Counter (PC) stores the address
- Address means the location on the RAM from where a data has be read or the data has to be written
- Program counter is a type of register
- The address stored in PC is the address of the next instruction that needs to be processed
- Address refers to a location on the RAM
- Then address is then sent to Memory Address Register (MAR), and this transportation occurs in the address bus.
- MAR knows now where it needs to find the instructions on the RAM
- MAR sends the address to the RAM location
- Address bus used again.
- Data that is stored in this location is sent to the component within the CPU called MDR (Memory data register)
- Also a register
- Data bus is used for this purpose
- When MDR received the instructions it send it to CIR (Current Instruction Register)
- MDR uses the data bus to send the instruction to the CIR
- Register is part of a component within the CPU called the Control Unit (CU)
- Here, the decode stage will occur
- Decode stage
- CU decodes the instructions
- Without decoding, instructions can not be executed
- Instruction set is used
- Commands that are understood and processed by CPU
- These are in machine code
- Once decoded, execution stage occurs
- Execute Stage
- The action required by the instruction is performed
- Mathematical and logical calculations occur
- Such calculations are performed in the arithmetic and logic unit (ALU)
- Interim values may be generated in this process, which are in the accumulator (ACC)
- A special register within the ALU
- Actions for the instructions can be performed
- The CPU acts as a conductor which tells all different components what to do.
- These signals are sent through the control bus
- Factors Affecting Performance of a CPU
- 3 main factors
- Cores, Clock speed and Cache
- Single core contains all the CPU components required in the fetch-decode-execute cycle
- One core means one cycle at a time.
- Two cores means two cycles at a time.
- Multitasking becomes possible
- Internal Clock
- Speed at which instructions are processed
- Measured in hertz
- One instruction per second is 1 hertz
- Cache
- Data storage within the CPU, instructions and data that the computer uses most can be stored in the cache
- CPU doesn’t need to fetch this data from the RAM, instead directly from the cache
- Process is quicker
- Larger cache allows less time of accessing from the RAM
- 3 main factors
- Input and Output Devices
- Input device is one that allows data to be entered into a computer
- Output device allows results of data processing to be shown, heard, seen etc.
- Sensor
- It is a type of input device used in automated systems
- Automated systems require minimal or no human interaction
- They capture some form of data for the computer from their environment
- This data is in analogue form
- It could be set to any time based on when the sample needs to be taken
- Acoustic sensor
- Senses sound levels
- Accelerometer
- Measures acceleration
- Flow
- Measures the liquid, gas or steam that is flowing through an environment
- Gas
- Measures the presence and concentration of a gas within the immediate atmosphere
- Humidity
- Measures the level of moisture in the immediate atmosphere
- Infra-red
- Measures infra-red radiations
- Level
- Measures substance level
- Light
- Measures light intensity
- Magnetic field
- Measures the presence of a magnetic field
- Moisture
- Measures the amount of water
- pH
- Measures the acidity level
- Pressure
- Measures the force of pressure
- Proximity
- Measures closeness of objects
- Temperature
- Measures the temperature of an object or substance
