Computer science

Cards (56)

  • Not gate is the opposite(output is opposite the input) the symbol is the triangle
  • and gate is both inputs have to be 1 for the output to be 1. the symbol looks like a capital d.
  • Pixels
    Tiny dots that make up images
  • Bitmap images
    • Mainly used for photos
    • Made up of lots of tiny dots, called pixels (picture elements)
  • Colour of each pixel
    Represented by a binary code
  • Number of colours in an image
    Related to the number of bits the code has
  • Black-and-white images
    • Use two colours
    • Need 1-bit to represent each pixel (0 for white, 1 for black)
    1. bit images
    • Can be made up of four colours
    • Each pixel can be one of four binary values (00, 01, 10, 11)
  • You can make a greater range of shades and colours by increasing the number of bits for each pixel
  • Increasing colour depth and image size

    Increases the file size
  • Colour depth
    The number of bits used for each pixel
  • Image size
    The number of pixels in the image, usually given as width x height
  • More pixels in an image

    Better the quality of the image
  • Using larger image size or colour depth means that there are more bits in the image, which can give a higher-quality image but also increases the file size
  • Calculating file size of an 8-bit image that is 2000 pixels wide and 1000 pixels high
    • 2000 x 1000 x 8 = 16,000,000 bits
    16,000,000 / 8 = 2,000,000 bytes
    2,000,000 / 1000 / 1000 = 2 MB
  • Bitmap images
    Made out of pixels
  • Image
    Made up of bits and stored in computers
  • Analogue to digital conversion
    Analogue signal converted into digits so computers can read and store sounds
  • Sampling
    Process of converting analogue to digital
  • Sample
    Each block of data that represents where the sound wave is at a particular point in time
  • Factors affecting size and quality of sound files
    • Sample rate (sampling frequency)
    • Sample resolution
    • File size formula
  • Sample rate
    How many samples you take in a second, measured in Hz or kHz
  • Sample resolution
    Number of bits available for each sample
  • Increasing sample rate means the analogue recording is sampled more often, resulting in better quality
  • Increasing sample resolution means the digital file picks up quieter sounds even if they're happening at the same time as louder ones, resulting in better quality
  • Increasing sample rate or sample resolution will increase the file size
  • Compression
    Making file sizes smaller, while trying to make the compressed file as true to the original as possible
  • Data compression

    1. Reduce file size
    2. Maintain original file quality as much as possible
  • Uses of data compression

    • Smaller files take up less storage space on a device
    • Streaming and downloading files from the Internet is quicker as they take up less bandwidth
    • Allows web pages to load more quickly in web browsers
    • Allows sending the same content with a much smaller file size in email
  • Lossy compression

    Works by permanently removing data from the file, limiting the number of bits the file needs and reducing its size
  • Lossless compression

    Makes the file smaller by temporarily removing data to store the file and then restores it to its original state when it's opened
  • Pros of lossy compression

    • Greatly reduced file size, meaning more files can be stored
    • Lossy files take up less bandwidth so can be downloaded and streamed more quickly
    • Commonly used-lots of software can read lossy files
  • Pros of lossless compression

    • Data is only removed temporarily so there is no reduction in quality - the compressed file should look or sound like the original
    • Lossless files can be decompressed - turned back into the original
    • Lossless compression can be used on text and software files
  • Cons of lossy compression

    • Lossy compression- 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.(lossless has better quality)
  • Cons of lossless compression

    • Only a slight reduction in file size, so lossless files still take up quite a bit of space on your device.
  • Run-length encoding is a form of lossless compression. It looks for consecutive repeating data. It store the number of times it repeats and makes one copy.
  • Huffman coding is a form of lossless compression.
  • if a binary number shifts left it multiplies and every shift left, the number is doubled.
  • In binary, if it shifts right it divides the binary number. for every place shifted right the number is halved.
  • 1 nibble is 4 bits.