Data Representation Flashcards
STORAGE UNITS:
How to covert from unit to unit:
Bit ⬇️divide by 8 Byte ⬆️multiply by 8 ———————————————— Kilobyte ⬇️divide by 1000 Megabyte ⬆️multiply by 1000 Gigabyte Terabyte Petabyte
What can Boolean be stored with?
Bits
What is half a bite known as?
A nibble
How many bits are in a byte?
1 byte = 8 bits
How many bytes are in 1 kilobyte?
1kilobyte(KB) = 2^10= 1024 bytes
What is a bit?
A single/smallest unit of binary data
Bit = (symbol) b, (binary value) 0 or 1
How many bits are in a nibble?
4 bits = 1 nibble
How many bits are in a byte?
1 byte = 8 bits
How many bytes are in a kilobyte?
1000 bytes = 1 kilobyte
How many kilobytes are in a megabyte?
1000 kilobytes = 1 megabyte
What base system is binary?
Base 2
How many megabytes are in gigabyte?
1000 megabytes = 1 gigabyte
BINARY CONVERSIONS:
What is the conversion table of binary?
128 64 32 16 8 4 2 1
BINARY ARITHMETIC:
What and how do you do binary left shift?
First you write the decimal number in binary. Then you move it left by the shift (for example, it may say left shift by 2). This as a multiple of the original becomes X4. This as a multiple of a power of 2 becomes 2^2.
What and how do you do binary right shift?
First you write the decimal number in binary. Then you move it right by the shift (for example, it may say right shift by 4). This as a division of the original becomes /16. This as a division of a power of 2 becomes /2^4.
HEXADECIMAL:
What base system is hexadecimal?
Base 16
What digits does hexadecimal use?
Numbers 0-9
Letters A-F
CHARACTER REPRESENTATION:
•What does ASCII stand for?
American Standard Code for Information Interchange
•How many bits does ASCII use?
7 bits
•How many characters will this (ASCII) give?
128 characters
•1 letter uses how much storage?
1 byte of storage
•4 letters will use how much storage?
4 bytes of storage
•What do other countries need to use?
Extended ASCII character set
•Why do other countries use Extended ASCII?
It is unique to their language and has extra characters, letters, and symbols
•How many bits are used are used in Extended ASCII?
8 bits
•How many characters will this (Extended ASCII) give?
225 characters
•What happens when a key is pressed on a British keyboard?
A code is generated that the computer can convert into a symbol for display or printing (the output)
•What if more than 256 characters are needed?
Unicode will be used (2 bytes)
Explain the possible limitations of using the ASCII character set for global communication.
It includes a range of characters, symbols, and letters.
It is specific/unique to one languages.
It is less demanding on memory.
It uses 7 bits of a byte to represent a character.
Explain the advantages of Unicode over ASCII for encoding characters.
it provides more than 4 billion possibilities.
ASCII fails to deal with the range of other characters we often need, such as those used in various non-English languages and mathematical symbols.
IMAGE REPRESENTATION:
State one way, other than increasing the number of colours available for each pixel, that the quality of a bit-mapped image could be improved.
Increasing number of pixels in the image and increase the resolution
Define the term pixel.
The basic unit of programmable colour on a computer display or in a computer image. The smallest part of a bitmap image.
Images can be represented in a computer’s memory as a bitmap. Explain how an image can be represented as a bitmap.
An image is broken down into pixels. The more pixels, the more clearer the image becomes.
Each pixel contains a number of bits to represent the colour. The more bits, the more colours.
State the maximal number of different colours that can be encoded when using two bits for each pixel.
2 to the power of 2 = 4
State the minimal amount of bits needed to encode 32 different colours.
5√32 = 2
State one factor, other than the number of bits used to represent individual colours, that can affect the quality of a bitmap image.
the resolution and the number of pixels
If an image has a resolution of 100x100 and a colour depth of 16bit. What size is the file in bytes?
100x100=10,000
2 to the power of ?=16
?=4
10,000x4=40,000 bytes
SOUND REPRESENTATION:
How does sound travel?
Sound travels as a wave. An analogue wave is continuous and doesn’t have any specific ranges.
Inputs and outputs would usually be analogue. However, to process this data it needs to be converted into binary.
This is done by taking samples of the analogue wave’s amplitude at regular time intervals.
A binary value is then given to each of these readings.
The sampling (rate) frequency is how many times a sample is taken per second, measured in hertz(Hz).
The sampling resolution is how many bits are available to store the samples. Also known as bit depth.
How do you work out file size?
SAMPLE RATE (Hz) X SAMPLE RESOLUTION (bits) X LENGTH (seconds) = FILE SIZE.
Calculate the file size in bits for a two minute sound recording that has used a sample rate of 1000 Hertz (Hz) and a sample resolution of 5 bits. You should show your working.
Time- 2 minutes (120 seconds) Sample resolution- 5 bits per second Bits- 4 5x4 = 20 bits 20x120 =2400 bits
The sound engineer is using a sampling rate of 2000 Hz and a sample resolution of 4 bits. What is the minimum file size of a 5 second recording? Your answer should be given in bytes. You should show your working.
Time – 5 seconds Sample resolution- 4 bits per second Bits- 4 4x4 =16 bits 16x5 =60 bits 60 bits x 8 = 480 bytes
COMPRESSION:
What two methods can be used to compress data?
RLE (Run Length Encoding) and Huffman Coding
Whoooooooowhooooooooooooo!
1) How many bits does ASCII use to store one character?
2) How many CHARACTERS are in this string?
3) Convert this into run length pairs.
4) How many bits are used ORIGNINALLY to store this?
5) How many bits are used to store once COMPRESSED?
6) CHALLENGE QUESTION:
How many extra bits does this use when stored as ASCII?
1) One byte (8 bits)
2) 26 characters
3) (1 W) (1 h) (8 o) (1 w) (1 h) (13 0) (1 !)
4) 8x26 = 208 bits
5) 8+8= 16bits
16x7= 112 bits
6) 208-112= 96 extra bits
KEY WORDS:
Binary:
A digital coding system which uses two values to represent data, 0 and 1.
Base 2 number system.
Decimal:
Relating to or denoting a system of numbers and arithmetic based on the number ten, tenth parts, and powers of ten.
Base 10 number system.
Hexadecimal:
Base 16 number system. Starts from 0-9 then A-F. Represents binary in a shorter form. Does not save memory.
Bitmap:
An image made up of pixels.
Pixel:
Smallest part of a bitmap image.
Resolution:
Number of pixels in an image.
Colour (bit) depth:
The number of bits used to represent a colour in a pixel.
Metadata:
Means “data about data”; it provides information about the image. Extra information about a file.
Lossy compression:
A method of data compression in which the size of the file is reduced by eliminating data in the file.
Makes a file smaller and data is lost.
Lossless compression:
As the file size is compressed, the picture quality remains the same- it does not get worse. Is a compression technique that does not lose any data in the compression process.
Makes a file smaller and no data is lost.
Sampling frequency:
This is how many times a sample is taken per second, measured in hertz (Hz).
Sampling resolution:
This is how many bits are available to store the samples.