2.2 Data Representation (B03) Flashcards
ASCII
- A standard
- For representing text/characters
- Allows data to be interchangeable between computers (from
different manufacturers) - Each character is mapped to a unique number/binary
equivalent - ASCII (encoding) uses 7/8 bits
- There are 128 unique characters
(allow 256 for 128)
text file - and why are they good?
only contains character-by-character encoding of the text
They are cross-platform: a text file on Windows is the same text file on a Mac, on Linux etc.
Most operating systems come with basic tools to view and edit them (Notepad on Windows).
what 2 ASCII values do you need to know
A = 65
a = 97
32 GAP BETWEEN
extended ASCII (ex)
uses eight bits, giving a character set of 256 characters. This allows for special characters such as those with accents in languages such as French and Spanish.
still not enough for all of the worlds languages
unicode (ex)
Uuses between 8 and 32 bits per character, so it can represent characters from languages from all around the world.
It is commonly used across the internet.
larger than ASCII, it might take up more storage space when saving documents
Global companies, like Facebook and Google, could not operate with just the ASCII character set because their users communicate in many different languages.
character set
the defined list of characters recognised by an encoding system. So, for example, ASCII has a character set that contains 128 characters.
exam question!
i) Each character is assigned a unique character code
Each letter is converted to its character code (which is a binary number)
ii) 0100 0011 0100 0001 0100 0010.
iii) ASCII uses 8 bits…
…and so can only represent 255 / 256 distinct characters…
…many more characters are needed for coping with all languages (e.g. Unicode 16bits)
ASCII does contain characters used in some languages
problem with ASCII
uses 7-bits - 128 characters - not enough to represent all of the worlds languages
unicode (16 bits) generally used instead
pixel
smallest element of a bitmapped image
metadata
basically data about the data
contains (for bmp):
No. of columns in the image
No. of bits in the binary numbers used to store the colours (in this example on the right: 2).
(also creation date, mod. date etc)
resolution
number of pixels per inch when the image is displayed.
Higher resolution -> more pixels per inch
image size
the number of pixels (width × height) - different from physical size or file size
bit depth (colour depth)
number of bits for each colour
bit pattern
a unique string of binary digits used in a representation
calculating file size (for pictures)
File size = width × height × colour depth
exam question!
An image is made up of / consists of pixels
A pixel can be one colour
Each colour has a unique / corresponding binary number
Each pixel / square is given the binary number of its colour
The binary numbers are stored in order in the file
E.g. White = 000, Red = 010, Blue= 110, top line would be 000000010010010110110
exam question!
To store data / information about the image / data
E.g. Dimensions / height / width / No. of bits per pixel / Colours used / location / date / file type
exam question!
Answer: 2 from
Fewer bits are needed per colour
which means fewer bits per pixel
Any example from diagram
analogue signal
varies continuously in both amplitude and frequency and the signal can take one of many different values
wavelength, amplitude, frequency
how to convert analogue to digital
SAMPLING = measuring the amplitude of the wave at regular intervals
stored as binary data
sampling interval
amount of time between samples, measured in seconds
what does x axis mean for digital sound waves
The 𝑥-axis represents time, but the numbers on the 𝑥-axis refers to the number of samples so far
sample rate
No. of samples per second (measured in HERTZ or Hz)
bit depth (sound waves)
The height (amplitude) of each sample is stored using a fixed number of bits (0s or 1s), known as the bit depth.
With more bits available, the amplitude can be recorded more accurately.
digital sound - good or bad? (mainly good)
A complete wave cannot be recorded, so a digital recording can never be as accurate or have the same fidelity as an analogue recording, but it does have other benefits such as:
Equipment to record and process digital sound is relatively cheap and has allowed people to record music at home.
It is easily edited using computer equipment.
It is easily copied.
Unlike vinyl and tape, digital files do not physically deteriorate with use, although they may become corrupted if the storage medium is damaged.
Digital files are more portable than records and tapes and can be copied to any digital medium, such as a hard drive, emailed, downloaded and streamed.
file size (sound)
file size in bits = sample rate * bit depth * duration (in seconds) * number of channels
exam question!
exam question!
Effect on colour depth (1)
* More colours can be represented (with 24 bits)
Effect on accuracy of representation (1)
* So the image looks more realistic
Effect on transmission speed/storage/memory (1)
* But takes longer to transmit / creates larger file sizes / uses more
memory