Computer science Flashcards
Revise for computer science exam
Give me the sizes for units of data:
Bit: 1 or 0
Nibble: 4 bits
Byte: 8 bits
Kilobyte: 1000 bytes
Megabyte: 1000 kilobytes
Gigabyte: 1000 megabytes
Terabyte: 1000 gigabytes
Petabyte: 1000 terabytes
Why do overflow errors occur?
Occurs when a number has too many bits.
Give me the operation when shifting binary digits to the left and the right.
Left shifts: multiply a binary number for every place shifted to the left, the number is doubled.
Right shift: divide a binary number for every place shifted to the right, the number is halved.
What can left shifts and right shifts cause?
Left shifts can cause overflows and right shifts can cause loss of data or its accuracy.
What are pixels?
A simple point in a graphical image.
What is a bitmap?
Stores each individual pixel.
What is color depth?
Number of bits needed to represent each pixel.
What is a vector?
The mathematical equation to draw the image.
What is the formula to calculate the number of colors using a the color depth?
Total number of colors = 2 to the power of n
n = number of bits per pixel.
What is image resolution?
Number of pixels in an image.
What happens if the resolution is increased?
The higher the resolution the higher the quality of the image but they also increase file size.
What is the formula for resolution?
width x height
What is the formula to workout the file size( in bits)
file size (in bits) = image resolution x color depth.
What is Metadata?
Metadata is the information stored in an image file which helps the computer recreate the image on screen from the binary data in each pixel.
Metadata includes the images :
File format, height, width, color depth and resolution.
What would happen without metadata?
Devices would not be able to display the image on screen as intended.
What are analogue signals?
Pieces of continually changing data.
Why do analogue signals need to be converted?
Analogue signals need to be converted into digital data so that computers can read and store sound files.
What device allows analogue signals converted?
Using analogue digital converters.
What is sampling?
The process of converting analogue signal to digital.
How do we convert analogue signals?
We sample the amplitude of the wave at regular intervals.
Relationship between amplitude and bit depth?
Amplitude can only take certain values depending on the bit depth.
What are the characteristics of digital data after being converted from analogue signals?
- Not continuous
- Lost a lot of data.
How can digital data be improved?
By taking samples more regularly.
What is sample rate or sampling frequency?
How many samples took in a second.
What is the measurement taken for sample rate?
Hz or Hertz
What is bit depth?
Number of bits available for each sample.
What is the formula to calculate the size of a sound file (in bits)
File size (in bits) = sample rate (in Hz) x bit depth x duration (in seconds).
What is data compression?
When we make file sizes smaller while trying to make the compressed file as true to the original as possible.
What are the uses of data compression?
- Takes up less storage space on computers.
- Streaming and downloading files become quicker as they take up less bandwidth.
- Allows web pages to load more quickly.
- Email services usually have restrictions on the size of the attachment you can send. Compressing the file size allows you to send the same content with a much smaller file size.
What are the 2 types of compression?
Lossy and lossless
What is Lossy compression?
Permanently removes data from the file.
What is lossless compression?
Makes the file smaller by temporarily removing data to store the file then it restores it to its original state.
What are the pros and cons of lossy compression?
Greatly reduced file size, takes up less band width and commonly used.
Loses data, cant be used on text or software files, worse quality but normally unnoticeable.
What are the pros and cons of lossless compression?
No reduction in quality, Can be decompressed and turned back to the original, can be used on text and software files.
There is only a slight reduction in file size.