Data representation (Paper 1) Flashcards
What is a bit(b)?
0 or 1 (binary)
What is a nibble?
4 bits
What is a byte (B)?
8 bits
What is a kibibyte (KiB)?
1024 bytes
What is a mebibyte(MiB)?
1024 KiB
What is a Gibibyte (GiB)?
1024 MiB
What is a tebibyte (TiB)?
1024 GiB
What is a pebibyte(PiB)?
1024 TiB
What is an exbibyte (EiB)?
1024 PiB
What is the most significant bit in binary?
The largest number
On a byte it would be 128
What is the least significant bit in binary?
The smallest number
On a byte it would be 1
What are the numbers 10-15 represented by in hexadecimal?
A-F
How would you convert a binary byte into hexadecimal?
.Firstly split the byte into two nibbles
.Then convert each nibble separately and join the results
How would you convert hexadecimal into denary?
.Remember that hex is in base 16
.Multiply the hexadecimal value by its place value and add the results
Where is hexadecimal used in real life?
.Color values in photo editing software’s and web design
.IPv6 addresses
.Unicode
Why is hexadecimal used rather than biary?
Hexadecimal is easier for programmers to remember rather than the binary equivalent
What are the rules of binary addition?
0 + 0 = 0
0 + 1 or 1 + 0 = 1
1 + 1 = 0 carry a 1
1 + 1 + 1 = 1 carry a 1
When would an overflow occur when adding binary numbers?
-An overflow occurs when the result of adding two binary numbers is greater than the number of bits allowed
-If the number falls out of the limit an overflow error is returned
Explain the effect on performing a binary right shift of two places on the number 11010110
-Each right shift will divide the number by 2
-so a two place right shift will divide the number by 4
-However, if the shift results in one more 1’s being lost at the right end the results will lose precision
How would you convert a negative denary number to binary?
.Convert the number into binary like it was positive
.Flip the bits
.Add one
.Convert
How would you convert a negative two’s complement binary number to denary?
.Flip the bits
.Add one
What is a signed representation of a binary number?
A signed integer can represent both positive and negative
What is an unsigned representation of a binary number?
Unsigned means it can only represent a positive integer
What is a character set?
A set of digits, symbols and letters that can be represented by a computer
How many characters can be represented by a 7 bit ASCII character set?
128
State was is meant by extended ASCII
Extended ASCII uses 8 bits rather than 7. this allows up to 256 characters to be represented
What is unicode?
Unicode uses 16 bits per character and can represent 65,536 different characters
What is the sample rate?
The number of samples taken per second in hertz
What is sample resolution
-The number of bits per sample
-A higher sample resolution enables more accuracy however a bigger file size
What is the formula for the sound file size?
Sound file size (bits) = Sample rate x sample resolution x seconds
What is a pixel?
The smallest identifiable area of an image each appearing as a square of a single colour
What is image resolution?
The number of pixels in the image
What is the colour depth when there are 2 colours?
1 bit per pixel required
What is the colour depth when there are 4 colours?
2 bits per pixel required
What is the colour depth when there are 8 colours?
3 bits per pixel required
What is the colour depth when there are 16 colours?
4 bits per pixel required
What is the formular for image size?
(Height x width x colour depth) ÷ 8 bits = file size in bytes
What is file compression and why is it used?
.File compression uses algorithms to remove repeated and unnecessary data
.This is so that the file size can be reduced
Which formats are Lossy compression?
JPG, MP3, WMV, MPG
What are the examples of lossy compression?
.Smallest file sizes which reduce transmission time
.Reduces internet traffic and collisions
What are the disadvantages of lossy compression?
Detail is permanently lost by reducing colour depth, resolution or sample rate
What are some generic examples of lossy compression?
Music streaming
Online images and videos
Image libraries on devices in the cloud
What are the formats of lossless compression?
TIF, PDF, GIF, PNG, ZIP
What are the advantages of lossless compression?
Original quality is preserved
No data or information is lost
What are the disadvantages of lossless compression?
Less significant reduction in the file size
What is the maximum range in twos complement with 8 bits
-128 to 127
How many possible combinations are there in a binary byte?
256
Why do computers use binary?
As all data that the computer systems transfer is sent by electrical signals which can be in 2 states on or off. As there are only 2 states it is all used as binary data
Why might a programmer prefer to use hexadecimal?
As each hexadecimal digit is 4 binary digits therefore making it easier to understand
What is unicode?
Code that uses 16 bits per character and can represent 65,536 different characters
What is extended ASCII?
Uses 8 bits rather than 7 which allows up to 156 characters to be represented
What happens when you increase the colour depth or bit depth on an image?
The quality increases aswell as the file size
Why is compression neccesary?
To reduce the size of the file
How does lossless compression compress data?
-By using run length encoding and frequency pairs to encode each run length of the same coloured pixel