computer science paper 1

Cards (296)

    • The purpose of the Central Processing Unit (CPU) is to fetchdecode and execute instructions
    • The Fetch-Execute Cycle is the cycle that the central processing unit (CPU) runs through billions of times per second to make a computer work
  • Fetch stage
    • During the fetch stage of the cycle, the next instruction or data must be fetched from the computer's memory (RAM)
    • The instruction or data is brought back to the CPU
  • Decode stage
    • During the decode stage of the cycle, the CPU needs to work out what is required from the instruction 
    • This could be a range of tasks depending on what the instruction or data included
  • Execute stage
    • During the execute stage of the cycle, the CPU will carry out the instruction that was fetched
    • Some examples that would take place at this stage are
    • Performing a calculation
    • Storing a result or data back in main memory (RAM)
    • Going to main memory to fetch data from a different location
  • The important things to remember are:
    • An instruction or data is fetched from memory
    • The instruction is decoded 
    • The instruction is executed
    • The cycle repeats billions of times per second
  • he CPU is made up of 4 key components
    • Arithmetic Logic Unit (ALU)
    • Control Unit (CU)
    • Cache
    • Registers
  • Arithmetic logic unit (ALU)
    •  Performs arithmetic operations
    • Performs logical decisions
  • Control unit (CU)
    • Coordinates how data moves around the CPU by sending a signal to control the movement of the data 
    • Decodes the instructions fetched from memory
  • Cache
    • Very small, very fast memory located in the CPU which is used to provide quick access to frequently used instructions and data
    • The more cache there is, the more data can be stored, which speeds up the performance of the CPU
    • It prevents the CPU from having to repeatedly fetch frequently used instructions from RAM
  • Registers
    • Extremely small, extremely fast memory located in the CPU
    • Each register has its very own specific purpose
    • The Von Neumann Architecture outlines how the computer memory, input / output devices and processor all work together 
    • The Von Neumann Architecture is a design of the CPU which was proposed by Mathematician John Von Neumann in the 1940s, which most general-purpose computers are built upon
  • he Von-Neumann-architecture
    • It consists of 4 main registers
    • The Program Counter (PC)
    • The Memory Address Register (MAR)
    • The Memory Data Register (MDR)
    • The Accumulator (ACC)
  • Program Counter (PC)
    • Holds the memory address of the next instructions to be executed 
    • Increments by 1 as the fetch-decode-execute cycle runs
  • Memory Address Register (MAR)
    • Holds the memory address of where data or instructions are to be fetched from
  • Memory Data Register (MDR)
    • Stores the data or instruction which has been fetched from memory
  • Accumulator (ACC)
    • Stores the results of any calculations that have taken place in the Arithmetic Logic Unit (ALU)
    • There are 3 common characteristics of the CPU
    • Clock Speed
    • Cache Size
    • Number of Cores
  • Clock speed
    • The clock speed is measured in Hertz (Hz)
    • The clock speed measures the number of fetch-decode-execute cycles that can take place in 1 second
    • The faster the clock speed, the more instructions can be fetched and executed per second
    • Modern computers have a clock speed in Gigahertz (GHz), meaning billion
    • A clock speed of 3.5GHz can perform up to 3.5 billion instructions per second
  •  Cache size
    • Cache is very small, very fast memory on or close to the CPU 
    • Cache is used as temporary storage to provide quick access to a copy of frequently used instructions and data
    • The larger the cache size, the more frequently used instructions or data can be stored
    • This results in the CPU having to complete fewer fetch cycles from memory (RAM), speeding up the performance
    • Cache also has a significantly faster read/write speed than RAM, making it much quicker to retrieve instructions from there instead of from memory (RAM) 
  • Number of cores
    • A core works like it is its own CPU
    • Multiple core processors mean they have multiple separate processing units that can fetch, decode and execute instructions at the same time
    • For example, a dual-core processor would have 2 processing units, each with their own
    • Control Unit (CU)
    • Arithmetic Logic Unit (ALU)
    • Accumulator (ACC)
    • Registers 
    • Multi-core processors can run more powerful programs with greater ease
    • Multiple cores increase the performance of the CPU by working with the clock speed
  • What is an embedded system?
    • An embedded system is a computer system with a single function, inside a larger mechanical unit
    • Examples of embedded systems include
    • Heating thermostats
    • Hospital equipment
    • Washing machines
    • Dishwashers
    • Coffee machines
    • Satellite navigation systems
    • Factory Equipment
    • Traffic lights
  • What are the properties of an embedded system?
    • They are small in size
    • They use less power than a general-purpose computer
    • They have a lower cost
  • Primary storage

    Short term, working memory that is directly connected to the CPU
  • Primary storage access times

    Considerably faster than secondary storage
  • Faster access times
    Dramatically reduces time taken to complete operations such as the Fetch-Execute Cycle
  • Primary storage
    Holds the data and instructions that the CPU needs to access whilst the computer is turned on
  • Primary storage
    • Used as short term, working memory, in hardware that is directly connected to the CPU such as RAM, and components that reside inside the CPU such as Cache and Registers
  • Performance of primary storage means a much higher cost which limits the amount that is used
  • What is RAM?
    • RAM (Random Access Memory) is primary storage that is directly connected to the CPU and holds the data and instructions that are currently in use
    • RAM is volatile which means the contents of RAM are lost when the power is turned off
    • For the CPU to access the data and instructions they must be copied from secondary storage
    • RAM is very fast working memory, much faster than secondary storage
    • RAM is read/write which means data can be read from and written to
    • In comparison to ROM, it has a much larger capacity
  • What is ROM?
    • ROM (Read Only Memory) is primary storage that holds the first instructions a computer needs to start up (Bootstrap)
    • ROM contains the BIOS (Basic Input Output System)
    • ROM is a small memory chip located on the computers motherboard
    • ROM is fast memory, much faster than secondary storage but slower than RAM
    • ROM is non-volatile which means the contents of ROM are not lost when the power is turned off
    • ROM is read only which means data can only be read from
    • In comparison to RAM, it has a much smaller capacity
  • What is virtual memory?
    • Virtual memory is an extension of primary storage (RAM) located on secondary storage
    • In situations where RAM is close to being full, virtual memory can be used so that the computer remains operational
    • Programs and data not currently being executed are transferred to virtual memory
    • Programs and data are transferred back to RAM when they are needed
    • Virtual memory is much slower than RAM and it's use will impact negatively on system performance
    • To avoid the use of virtual memory, increase the size of the RAM
  • The Need for Secondary Storage
    • Computer systems need both primary and secondary storage to operate
    • Both types of storage play a crucial role in the operation of a computer system
    • primary is volatile an has small storage
    • secondary is non-volatile and has a large capacity
  • Why do you need secondary storage?
    • A computer needs secondary storage for long term storage of programs and data that are currently not in use 
    • Secondary storage is needed as ROM is read only and RAM is volatile
    • Secondary storage holds the programs and data whilst the computer is turned off (non-volatile)
    • Performance of secondary storage is slower than primary storage but capacity is much higher which makes it perfect for backup & archive of data files
  • What are the characteristics of secondary storage?
    • Capacity What is the maximum amount of data that can be stored?
    • Speed How fast can data be read from and written to? (R/W)
    • Cost How much does it cost?
    • Portability How easy is it to move around? What is the physical size? Weight?
    • Durability How robust is the storage?
    • Reliability What is the probability that the device will consistently perform its function?
    • There are 3 types of secondary storage:
    • Magnetic
    • Solid State
    • Optical
  • What is magnetic storage?
    • Magnetic storage is a type of non-volatile media that uses magnets (polarity) to store binary 0s and 1s
    • Advantages/disadvantages
    • Capacity High storage
    • Durability Moving parts can get damaged if dropped
    • Cost - Low per gigabyte
    • Portability Heavy & bulky making them less convenient for transport
    • Speed - Moderate read/write access 
    • Reliability - Prone to mechanical failure Noise Loud (spinning disks)
  • What is solid state storage?
    • Solid state storage is a type of non-volatile media that uses electronic circuits to store binary 0s and 1s
    • AdvantagesDisadvantages
    • Capacity -Medium/high storage
    • Cost - Very high per gigabyte
    • Speed - Very fast read/write access
    • Reliability - Limited read/write cycles
    • Durability- No moving parts 
    • Portability -Small and no moving parts
    • Noise -Silent  
  • What is optical storage?
    • Optical storage is a type of non-volatile media that uses lasers to burn the surface of a disk, creating pits and lands suitable for storing binary 0s and 1s
    • AdvantagesDisadvantagesCost - Very low per gigabyteCapacity Very lowDurability No moving partsSpeed - Very slow read/write accessPortability Small and no moving partsReliability - Prone to scratchesNoise Silent  
  • What is optical storage?
    • Optical storage is a type of non-volatile media that uses lasers to burn the surface of a disk, creating pits and lands suitable for storing binary 0s and 1s
    • Advantages/Disadvantages
    • Cost - Very low per gigabyte
    • Capacity Very low
    • Durability No moving parts
    • Speed - Very slow read/write access
    • Portability Small and no moving parts
    • Reliability - Prone to scratches
    • Noise-Silent