chapter 1 - information representation Flashcards
denary numbers
base 10 use digits 0-9
place values …100,10,1
binary numbers
base 2 use digits1/0
each is a bit
place values 128…8,4,2,1
- computers can only recognise on/off states of transistors so has to use 1/0
hexadecimal numbers
base 16 use digits 0-9,A-F
place values …256(16^2),16,1
1 hex digit = 1 nibble
binary number
bit - 1 digit
nibble - 4 digits
byte - 8 digit
3 digit hex
12A
256 + 32 +10
=298
decimal prefixes
kilo (k) x10^3
mega (M) x10^6
giga (G) x10^9
tera (T) x10^12
(use base10)
binary prefixes
kibi (Ki) x2^10
mebi (Mi) x2^20
gibi (Gi) x2^30
tebi (Ti) x2^40
(uses base 2)
ones complement
the binary number obtained by subtracting each digit in a binary number from 1
(flip all the numbers to the opposite eg 1>0)
twos complement
the ones complement of a binary number plus 1
– the most significant bit becomes negative – holds the signed value
why use twos complement
to represent signed integers rather than just their magnitude
benefits
- one representation of zero
- computer can’t subtract only add
binary addition
0+0= 0
0+1= 1
1+1= 0 (carry the 1)
1+1+0 = 0 (carry the 1)
1+1+1=1 (carry the 1)
binary subtraction
0-0 = 0
0-1 = 1 (borrow a 1)
1-0 = 1
1-1 = 0
(or just + the twos compliment of the number)
overflow error
when the result of a calculation is too large to fit in the number of bits defined for storage
eg if storage uses 8bits and result is larger than 256
binary coded decimal (BCD)
uses a nibble to represent a denary digit
- useful in apps that require single deanery digits to be stored
- convert each digit into binary using a nibble - if over 9 you have to +6 (can’t represent 10 using one denary place value)
- used for digital clocks, calculators, currency
packed BCD
when 2 BCD nibbles are stored in one byte
ASCII
American Standard Code for Information Interchange
represents 2^7 characters
mainly represents latin alphabet languages
unicode
represents 2^16/32 characters
can represent other languages and symbols
vector graphics
consists of drawing objects defined in a drawing list
list contains a command for each object included in the image - which has a list of attributes defining the property of the object eg the geometric data (centre of circle)
dimensions are not explicitly defined but are relative to the canvas so it can be scaled up/down
drawing objects
component defined by geometric formulae and associated properties
drawing list
one set of values for each drawing object eg commands which have attributes that each define a property
property - defines one aspect of the appearance eg colour, line thickness, line colour
vector graphic resolution
zooming in and out has no effect on the resolution as its scalable
Vector uses less memory than a bitmap – vector stores an algorithm to draw rather than every pixel
bitmap images
divided into pixels - smallest identifiable area of an object
- each pixel is given a colour to build up a picture
pixel
smallest identifiable component of a bitmap image
single square of one colour
defined by its position and colour
colour/bit depth
colour depth - number of bits used to represent one pixel
bit depth - number of bits used to represent each of RGB colours
image resolution
number of pixels in the bitmap file
width x height
screen resolution
the width x height for the number of pixels that the screen can display
file header
data about the bitmap image
set of bytes at the beginning of a bitmap file which identifies the file and contains info about the coding used
vector vs bitmap
- vector is if its part of architectural engineering or manufacturing design
- vector can’t be printed using a laser/inkjet printer so has to be converted to bitmap
- vector is scalable - has better resolution
- camera produces bitmap
- bitmap file is used to insert an image into a document
ADC
converts analogue data to digital data
components of a sound encoder
band limiting filter
ADC
band limiting filter
removes high freq components that a human ear cant detect
analogue sound
continuous data - real wave
digital sound
discrete data - stored as binary
sampling rate
number of amplitude samples per second
- done in accordance to nyquists theorem - sampling must be done at a freq which is twice the highest freq of the sound in the sample
sampling resolution
the number of bits used to store each amplitude sample
sampling
taking amplitude measurements of the wave at set values
compression
larger files = larger storage = lower transmission = slower download rate
so compression reduces the file size
lossless compression
reduces size but no information is lost - process can be reversed to recreate original
eg RLE - PNG, ZIP, GIF
lossy compression
reduces file size (generally more) with some loss of information - original file can’t be recovered - not used for text
- information removed cannot be noticed by the human eye/ ear - high freq or close together amplitudes are removed
eg Huffman coding - MP3, MPEG, JPEG
Huffman coding
text is analysed and placed into a frequency tree
most frequent has the shortest code
RLE
Run-length encoding
Replace sequences of the same colour pixel
with colour code and number of identical pixels
file size (sound)
sample resolution x sample rate x time (secs)
file size (images)
resolution x colour depth
how to compress a vector graphic file
convert to a scalable vector graphics format
can be stored smaller and scaled up when used
describe how one character is represented in a character set
Each character is represented by a unique denary / hexadecimal / binary number
why is it important to estimate the file size of an image
know how much storage is necessary??
parity check
- a bit is added to check for errors in transmission (parity bit)
- either even or odd - eg even adds a 1/0 to make the no. 1s even
- parity check - if the value conforms to the type of parity (even or odd) then the data is correct if not it will have to be resent
bitmap vs vector (4)
- pixels vs set of instructions about how to draw the shape
- bitmap bigger than vector graphics files - take u more space
- Enlarging a bitmap can mean the image is pixelated - vector is scalable
- Bitmap images can be compressed (with significant reduction in file size) - Vector don’t
- photographs / scanned images
vs geometric shapes - Vector graphics need to be ‘rasterised’ in order to display or print
benefits of vector (2)
Can resize it without pixilation - Image is redrawn/recalculated with each adjustment
Smaller file size - Storing points/equations/commands etc., not individual pixels
4 utility programs
Disk formatter
* Prepares a hard disk to allow data to be stored on it
Antivirus software
* Checks for viruses and quarantines removes any virus found
File compression
* Reduces file size by removing redundant details (lossy / lossless)
Firewall
* Prevents unauthorised access to computer system from external sources
bit streaming
- Contiguous sequence of digital bits sent over a network (one after the other in order)
Needs; - high speed data communication link (fast broadband)
- compression before transmission
- some buffering to ensure the smooth playback of files
bit streaming +/-
+no need to wait for a whole file to be downloaded
+no need to store large files on user’s computer
+allows on demand playback
+no specialist software is required for playback in browser
- video stops if very slow broadband
- video stops if inadequate buffering capacity
- only access when connected to internet
- may require specific software to run the files / films
- viruses can be downloaded from the websites
real time vs on demand bit streaming
On demmand
- converted to streaming format - uploaded to a server
- Link is on a server to be downloaded by the user
- Downloaded in a contiguous bit stream
- Stream can be broadcasted as and when required
- Possible to pause/rewind etc
Real time
- Captured by a camera and sent to a computer then converted to a streaming file - uploaded to the streaming server
- Server sends the video to the users device
- Cant pause/rewind etc as its live
how it is possible to watch the video without it continually pausing - bit streaming
- needs high-speed broadband
- Data is streamed to a buffer
- Buffering stops video pausing as bits streamed
- As buffer is emptied, it fills up again so that viewing is continuous
- Actual playback is (a few seconds) behind the time the data is received by computer (held in a buffer for a few seconds)
character set
list of characters that have been defined by computer hardware and software - necessary to have a method of coding so comp can understand human characters
common editing of sound features
- edit start / stop times
- extract part of a sample
- alter frequency/ amplitude
- merge tracke
- remove noise / engance one sound wave
- convert between audio formats
perceptual music shaping
removes certain sounds
eg freq outside human hearing range
eg if 2 soudns are at the same time the louder one can onyl be heard so it removes the quieter one
used in MP3/ MP4
general methods to compress files
movies
- reduce sample rate
- reduce sample resolution
- reduce frame rate
images
- crop
- decrease bit depth
- reduce image resolution