Data Storage Flashcards
What are the units in Computer Science
Bit
Nibble
Byte
Kilobyte
Megabyte
Gigabyte
Terabyte
Petabyte
Hertz
How many bits in a byte
8
How many bits or bytes in a nibble
Half a byte
4 bits
How many bytes in a kilobyte
1000
How many kilobytes in a megabyte
1000 kilobytes
or 1 million bytes
How many megabytes in a gigabyte
1000 megabytes
How many gigabytes in a terabyte
1000 gigabytes
How many terabytes in a petabyte
1000 terabytes
What are the two only states that a computer can understand
Power on
Power off
What is the power term called
Switches
What are switches represented by
Power on represents a 1
Power off represents a 0
What is the table layout for binary and denary
128, 64, 32, 16, 8, 4, 2 1
What is denary
A whole number
What is binary
An 8 bit number
What is 32 in binary. Show steps
128, 64, 32, 16, 8, 4, 2 1
0 0 1 0 0 0 0 0
00100000
What is 78 in binary
128 64 32 16 8 4 2 1
0 1 0 0 1 1 1 0
01001110
How do we convert binary to denary
128, 64, 32, 16, 8, 4, 2 1
If there is a 0 under a number, we don’t add that number up. If there is a 1 under the number, we add that number. For example If we have the binary number of
10001001
Substitute this in the table.
There is a 1 underneath 128, 8 and 1, so add all those numbers up, which makes 137. For this example we say that 10001001 is 137 in denary
Convert 00100111 into binary
39
Whats the highest possible denary number and binary number
11111111
255
What is hexadecimal
A number that uses a base of 16. It starts from 0 to 9, then from A to F
How do we convert hexadecimal to denary
Multiply the left hand digit by 16, then add the units
How do we convert hex 7 to denary
Multiply 7 and 16.
Then add 10
Hex 7 is 122 in denary form and 7 in decimal form
What is hex 27 in denary
(2x16) + 7 = 39 in denary form
How do we convert denary to hexadecimal
Divide the denary number by 16. The remainder gives the units.
What is denary 72 in hexadecimal
72/16 = 4.5: 4 remainder 5
45 in hexadecimal
How do we convert binary to hexadecimal
- Take a binary word of 8 bits
11100101 - Divide into two nibbles of 4 bits
1110 and 0101 - Convert each nibble into its hexadecimal value
1110 = 14 = E in Hex
0101 = 5 in Hex
11100101 = E5 in Hex
How do we convert hexadecimal to binary. What is 3B in binary
Split the two hex characters
3 = 0011 and B = 1011
3B = 00111011
What is A5 in binary
A = 10 = 1010
5 = 0101
A5 in hex = 10100101
What is hex 21 in binary
2 = 0010 and 1 = 0001
21 in hex = 00100001
Why do we use hex
- It is easier to convert between hex and binary
- People are likely to make less digit errors
- Quicker to write and type since hex digit only takes up 1 digit rather than 4 bits
- Much simpler to remember a hex value than a binary value
- An advantage for programmers and Computer Scientists
How does numbers work on computers
Computers work with a fixed number of bits at a time.
What is an overflow error
When the result of the addition is too large for the number of bits that a computer works with
What are the two logical binary shift operations
Left shift
Right shift
What is a binary shift left
A binary shift left of one bit moves all the bits one place to the left. The vacant bit spaces are replaced with 0
How does a binary shift left have an affect on the number
The number is doubled
Eg: 1000 = 8
Shift left once = 10000 = 16
What is a binary shift right and what is the effect
A binary shift right of two places halves the number and rounds down each time
Eg:
1000 = 8
Shift right once = 100 = 4
Shift right twice = 10 = 2
Eg: 2
1001 = 9
Shift right once = 100 = 4
Shift right twice = 10 = 2
What are the effects of shifts
They can quickly multiply or divide the binary number by 2
How are characters represented in binary
Every character on the keyboard is represented by a binary number.
Uppercase letters (capitals) have different values from lowercase letters
Punctuation symbols have their own character code
What are the four mandatory components that a computer needs to contain
26 lowercase letters
26 uppercase letters
10 numbers
36 other characters
This creates 98 total characters
What is a character set
Collection of characters that a computer recognises from a binary representation
What are character sets a set of
Letters
Symbols
Digits
What are three major character sets used today
ASCII
Extended ASCII
Unicode
What is ASCII
A 7 bit character code, that has 128 different characters that can be encoded.
What is ASCII Extended
An 8 bit character code, that has 256 different characters that can be encoded.
How are ASCII character codes setup
ASCII codes are normally grouped and ran in sequences.
What are some types of character codes
7 bit character code
8 bit character code
16 bit character code
How many different characters can be encoded via a 16 bit character code
65536
What is Unicode
A new code allowing for many more different characters to be used. It has a 16 bit and a 32 bit character code. The 32 bit version gives over 4 billion possible combinations
What can we use Unicode for
Emoji storing
Writing text
How many bytes in a Unicode
16 bits = 2 bytes
32 bits = 4 bytes
What is an image
A visual representation of something, which can consist of a drawing, painting or picture
How are digital images stored on a computer
BMP
JPG
GIF
PNG
TIFF
SVG
AI
PS
What is a bitmap image
Images made up of picture elements or pixels
What is a pixel
The smallest identifiable area of an image
How does a pixel plays its part
Each pixel is a single colour and assigned a binary value that represents that colour
Can we change the pixel colour?
Yes. But we have to change the value because the binary value is tied to the original colour
What is image resolution
The concentration of pixels within a specific area. The area is defined by the image width and height in pixels
How do we create an image
- Each pixel gets a binary value
- Each value represents a different colour
- Using 1 bit per 1 pixel allows only 2 values: 0 and 1
1 = Black
0 = White
This would create a black and white image
What is image resolution measured in
DPI (Dots per inch)
PPI (Pixels per inch)
How do we increase the number of colours in an image
More bits per pixel = More colour combinations
How many colours in 1 bit
2
How many colours in 2 bits
4
How many colours in 3 bits
8
How many colours in 4 bits
16
How many colours is a pixel able to represent
A Finite amount of colours
What is bit depth
Number of bits in each sample
What does a higher bit depth give to an image
Greater colour range
Better image quality
What happens when we reduce colour
Size reduction
Fewer bits needed per colour
Fewer bits per pixel
What is the effect of modifying the colour depth
The number of colours displayed
What is a monochrome image
An image represented in binary as a bit pattern
How are colour values of individual pixels expressed
Denary RGB values
Hexadecimal form
Why isn’t binary sued for monochrome images
Less easier to
Read
Write
Remember
Reduce copied errors
Not used by designers
What is the pixel proportion for a monochrome image
A proportion of
Red
Blue
Green
From a distance, it makes up a colour
What is image metadata
Data about data. It is information other than image data which is stored within a file
What does metadata include
Colour
Resolution
Date created
Author
What links file size and resolution
The greater the resolution of the image, the greater the file size
What is sound
Continuous and regular vibrations which result in noise
What are the two types of sound signals
Digital sound signals
Analogue sound signals
What’s the difference between the signals
Digital sound is discrete
Analogue sound is continuous
How is sound digitized
Repeatedly measuring and recording the sound wave
How do we store sound on a computer
Convert sound to digital form
What are two types of Analogue to Digital convertors
ADC (Analogue to Digital Convertor) converts input to digital signals
DAC (Digital to Audio Convertor) converts digital signals to output
What is a sound sample
A measure of amplitude of a sound wave at a given time
What are the units of a sound sample
Bit depth
Sample rate
What is the bit depth
The factor that determines how closely the wave is sampled at the y axis
What is the sample rate
Number of samples taken per second
What is the measurement of sample rate
Hertz (Hz)
1Hz = 1 sample per second
What is sample resolution
The number of bits (audio bit depth) used to record each measurement
What is the effect of increasing the number of bits per sample
Enables the height of the wave to be more accurately measured, but an increased file size
What is another word for sample rate per second
Frequency
What is the effect of frequency
Has an effect of the level of detail in the digital representation
What is the effect of increasing frequency
The greater the frequency, the greater the accuracy and larger the file size
What is file size measured in
Bits
How many bytes in a bit
1 bit = 0.125 bytes
What is the equation for sound file size
Sample rate x Bit depth x duration
How do we get improved recorded sound quality
Large frequency of sound sampling
Great accuracy of recorded wave height
What is the effect of increasing the sample rate
More data points recorded
Approximately, what can we hear sounds from
20 - 20000 Hz
Younger people can hear sounds at higher frequencies
What is another word for height
Amplitude
How do we convert music into a file
- The wave amplitude is measured at regular intervals
- These are then turned into binary
What is the effect of a smaller interval
Larger files
Closer sound to original
Better sound quality
What is compression
Reduces the file size of an image or object
What is decompression
The process of expanding computer data to its normal size so that it can be read by a computer.
What is compression used for
Sound
Images
Video files
What happens if we use different compression levels
Different compression levels affect quality of compressed images.
Data elimination
Size reduction
Why should we use smaller file sizes
It can improve a site’s performance and loading times. The smaller the file size, the faster the performance
What are the two types of compression
Lossy
Lossless
What is lossy compression
Lossy compression reduces the file size, but deletes as much data as possible, permanently. But it is barely noticeable
What are the common file standards for lossy compression
JPEG: Photo use
MP4: Video file format
MP3: Music format
What are the advantages of lossy compression
- Doesn’t take up as much file space when compressed
- Greatly reduces file size
- They take up less bandwidth so can be downloaded and streamed more quickly
- Lots of software can read lossy files clearly
- It is barely noticeable when there is a reduction in size quality
What are the disadvantages of lossy compression
- Data is deleted permanently
- Decompression is not applicable for lossy compression
- Text or software files will not work as all the data is going to be deleted as files must retain all information of the original
- Causes degradation which reduces the image quality
- Digital artefacts can appear in images and videos
- Noise is seen when there’s contrasting colours
Removal of sound so - We can’t easily hear the least affect of perceived playback quality
What is lossless compression
Lossless compression reduces the file size but doesn’t delete any of the original data. It stops metadata and such.
What does lossless compression allow us to do
It allows you to restore compressed files to its original form.
What are common file standards for lossless compression
PNG: Is used for images and photos which can include transparency
ZIP: Document compression
GIF: Simple images, animations may be included
FLAC/ALAC: Lossless music format (Free Apple)
What are the advantages of lossless compression
- Can be decompressed, restored to original
- No reduction of quality
- Can be used on text and software files
- No data is deleted
What are the disadvantages of lossless compression
- Takes up a lot more space than lossy compression
- Only a small reduction in file size