Computer Science Mocks Flashcards
What is a bit?
A binary digit that is a 0 or 1
What is a nibble?
A group of 4 bits or 1/2 a byte
What is a byte?
A group of 8 bits that can store 1 of 256 numbers
How many bytes in a kilobyte?
1000
Order of bytes?
Bit - Nibble - Byte - Kilobyte - Megabyte - Gigabyte - Terabyte - Petabyte
How many kilobytes in a megabyte?
1000
How many megabytes in a gigabyte?
1000
How many gigabytes in a terabyte?
1000
How many terabytes in a petabyte?
1000
How do overflow errors occur?
When binary addition results in a 9 digit number
What is a binary shift?
A way of multiplying or dividing binary by powers of 2
Is a right binary shift multiplying or dividing?
Dividing
Is a left binary shift multiplying or dividing?
Multiplying
Why might the size of a file need to be reduced?
- Less storage space required
- Faster download times for better online experience
- Faster streaming of video/audio files
Two types of compression?
- Lossy
- Lossless
What is lossy compression?
When unrequired data is removed from a file
An example of lossy compression?
MP3s where sound quality may reduce but not enough to notice.
What is lossless compression?
When data is temporarily removed from a file but added back (rebuilt) when the file is used again
An example of lossless compression?
Zip files, they need to be extracted before they can be used
How do MP3s use lossy compression?
Certain frequencies that are not noticeable are removed which reduces data but no noticeable loss of quality
How do online chatting and mobile phone networks use lossy compression?
Used to ensure only a small amount of bandwidth is used which reduces sound quality but is still understandable by the other person
How do images use lossy compression?
Details of the image may be lost but not impairing overall quality
Why is lossy compression important on websites?
Page load speeds can be affected by images that are especially large in size
Two types of lossless compression?
- Run Length Encoding
- Dictionary Coding