Data Flashcards
How do you find out how a negative number would be represented in two’s complement notation?
- Write out the positive number in binary
- Flip the bits
- Add 1
How do you do a logical shift by n places?
Move each binary digit n positions to the left or right. Fill empty spaces with 0
How do you do an arithmetic shift right by n places?
Move each binary digit n positions to the right. Fill the empty spaces with 1
What are text and characters represented by?
ASCII (American Standard Code for Information Interchange)
How many bits does the ASCII contain?
7 bits
What is an overflow error?
When there are too many bits that can be stored in a number
What is the formula for image file size in bits?
width x height x colour depth
What is a sample interval?
The time for the intervals during each sample of a sound wave
What is a sample rate?
The number of samples over a given time period
What is the formula for audio file size?
file size = sample rate x bit depth x recording length
What is lossless compression?
The file size is reduced without deleting any data
What is lossy compression?
The file size is reduced by deleting some data. The original file cannot be restored
What are some examples of lossless compression?
GIF
PNG
What are some examples of lossy compression?
MP3
JPG