memory and storage

Cards (24)

  • RAM (random access memory)
    • used as the main memory in a computer. it can be read and written to. RAM is volatile (temporary)
    • the main memory is where all data, files and programs are stored while they're being used
    • when a computer boots up, the operating system is copied from secondary storage to RAM
    • when software applications, documents and files are opened, they are copied from secondary storage to RAM. they stay there until the files or applications are closed
    • RAM is slower than the CPU cache, but faster than secondary storage
  • virtual memory
    • computers have a limited amount of RAM. as applications are opened, RAM fills with data
    • when RAM is full, the computer needs somewhere else to put application data. it moves data that hasn't been used recently to a location on secondary storage known as virtual memory
    • virtual memory may be needed if there are too many applications open at once, or if a particularly memory-intensive application is being used
    • if the CPU needs to read data stored in virtual memory, it must move the data back to RAM. this is slow as data transfer rates are much slower on secondary storage than RAM
    • using virtual memory can make a computer slow to respond when switching between applications or when using memory-intensive application
  • ROM (read only memory)
    • non volatile memory (permanent). it can only be read, not written to
    • ROM comes on a small, factory-made chip built into the motherboard
    • it contains all the instructions a computer needs to properly boot up. these instructions are called the BIOS (basic input output system)
    • as soon as the computer is powered on, the CPU reads the instructions from ROM. this tells the CPU to perform self-checks and set up the computer, e.g. test the memory is working okay, see what hardware is present and copy the operating system into RAM
  • more RAM
    • if a computer has too little RAM it may run slowly due to the use of virtual memory
    • the more RAM, the more applications or more memory-intensive applications it can run smoothly, making it faster overall
    • it is easy to upgrade RAM on a PC or laptop
    • if the computer already has plenty of RAM to run, increasing RAM may make no difference to performance
  • storage
    • primary storage refers to the memory areas that the CPU can access very quickly, like CPU registers, cache, ROM and RAM. primary storage has the fastest read/write speeds and is mostly volatile
    • secondary storage is non-volatile, it is where all data (operating systems, applications and user files) are stored when not in use. it includes magnetic hard disk drives, solid state drives, CDs and SD cards. read/write speeds are much slower compared to primary storage
  • hard disks
    • hard disk drives (HDD) are traditional internal storage in PCs and laptops
    • a hard disk drive is made up of magnetised metal disks that spin thousands of times a second
    • data is stored magnetically in small areas on the disk's circular tracks
    • a moving arm can access these areas and read and write data
    • portable HDDs are popular for backing up data and transporting large amounts of data
    • despite their moving parts, they are generally long-lasting and reliable, although they could be damaged when dropped
  • hard disk drive criteria:
    • capacity - very large
    • speed - fast (but not fastest)
    • portability - okay
    • durability - moving parts are damageable
    • reliability - very reliable
    • cost - affordable
  • solid state drives
    • SSDs are storage devices with no moving parts and are used for internal and external storage
    • they use a type of flash memory (non-volatile memory)
    • they have faster read-write times than HDDs
  • solid state drive criteria:
    • capacity - large
    • speed - faster than HDD
    • portability - best
    • durability - best
    • reliability - limited read/write cycles
    • cost - good, becoming more affordable
  • flash storage
    • USB pen drives and memory cards (e.g. SD cards) are also flash-based, solid-state storage
    • they are much slower than SSDs and have a shorter read/write life
    • they are used to expand the storage capacity of small devices like cameras, smart phones and tablets (which are too small for SSDs and HDDs). they have a high capacity for their small size
  • character set
    collections of characters that a computer recognises from their binary representation
  • ASCII
    • a commonly used character set for English speaking places. each ASCII character is given a 7-bit binary code - this means ASCII can represent up to 128 characters, including all the letters in the English alphabet, numbers, symbols and commands
    • an extra bit (0) is added to the start of the binary code for each ASCII character so they fit nicely into 1 byte
  • Unicode
    • comes in several different forms and tries to cover every possible character or symbol that could be written. Unicode uses multiple bytes per character
    • it covers all main languages and different alphabets
    • the first 128 codes in Unicode are the same as ASCII
  • size of a text file
    • file size (in bits) = number of bits per character x number of characters
  • images
    • most images are bitmap images - e.g. photos. they're made up of lots of tiny dots, called pixels
    • the colour of each pixel is represented by a binary code. the number of colours available in an image is related to the number of bits a code has
    • black and white images only use two colours so they need 1 bit for each pixel - e.g. 0 for white and 1 for black
    • 2 bit images can be made out of four colours
    • you can make a greater range of shades and colours by increasing the number of bits for each pixel
  • colour depth
    • number of bits used for each pixel
    • total number of colours = 2n^n (where n = number of bits per pixel)
  • resolution
    • number of pixels in the image. the higher the resolution, the more pixels the image is made of, so the better quality the image is
    • resolution = width x height
    • file size (in bits) = image resolution x colour depth
  • metadata
    • the information stored in an image file which helps the computer recreate the image on screen from the binary data in each pixel
    • metadata usually includes the image's file format, height, width, colour depth and resolution
  • sound
    • sound is recorded by a microphone as an analogue signal. analogue signals are pieces of continually changing data
    • analogue signals are converted into digital data so that computers can read and store sound files. this is done by analogue to digital converters, which are found in most modern recording devices
    • the process of converting analogue to digital is called sampling
    • digital data is discreet, not continuous like analogue. it has lost lots of data
    • the digital data can be improved by taking samples more regularly
  • sampling
    • measure the amplitude of the analogue wave at regular intervals per second and store the value as a binary number
  • sound files
    • sample rate is how many samples you take in a second, measured in Hz
    • bit depth is the number of bits available for each sample
    • file size (in bits) = sample rate x bit depth x duration (in seconds)
    • increasing sample rate means the analogue recording is sampled more often. the sampled sound will be better quality and will match more closely to the original recording
    • increasing the bit depth means the digital file picks up quieter sounds. this will also result in a sampled sound that is closer to the quality of the original recording
    • increasing sample rate or bit depth will increase file size
  • compression
    • data compression is when file sizes are made smaller, while trying to keep the compressed file true to the original
    • uses:
    • smaller files take up less storage space
    • streaming and downloading files from the internet is quicker as they take up less bandwidth
    • it allows web pages to load more quickly in web browsers
    • email services usually have restrictions on the size of the attachment you can send - compressing the file allows you to send the same content with a much smaller file size
  • lossy compression
    • permanently removes data from a file. this limits the number of bits the file needs and reduces its size
    • pros:
    • greatly reduces file size, meaning more files can be stored
    • lossy files take up less bandwidth so can be downloaded and streamed more quickly
    • it is commonly used
    • cons:
    • loses data - the file can't be turned back into the original
    • lossy compression can't be used on text or software files as these files need to retain all the information of the original
    • lossy files are worse quality than the original but usually it is unnoticeable
  • lossless compression
    • makes file size smaller by temporarily removing data to store the file and then restores it to its original state when opened
    • pros:
    • data is only removed temporarily so there is no reduction in quality - it should look or sound like the original
    • lossless files can be decompressed - turned back into the original
    • it can be used on text and software files
    • cons:
    • only a slight reduction in file size