Computer science Flashcards
Revise for computer science exam (35 cards)
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.