binary <=> hex: split binary into nibbles (8, 4, 2, 1) and turn into hex based on added value (0-9 or A-F if it's 10-15)
denary => hex: with binary each number to the left increases in multiples of 2. But with hexadecimal it increases by powers of 16. So our columns are as follows: 4096, 256, 16, 1. Under each column, write how many times it fits into that power (if it is 10-15 write A-F)
hex => denary: shove the hexadecimal into 4096, 256, 16, 1 columns and multiply the hex by the column and add them all together
binary addition
0 + 0 = 0
1 + 0 = 1
1 + 1 = 0carry1
1 + 1 + 1 = 1carry1
If the number of bits required to store the answer is bigger than the number of bits in the available range, then this is an overflowerror.
Multiply a number, a binary shift moves all the digits in the binary number along to the left and fills the gaps after the shift with 0 (XO easier to draw for right hand onto left):
x 2, all digits shift 1 place left (add 0 on right hence x 0 on left hand)
x 4, 2 places left (2 0s)
x 8, 3 places left (3 0s)
To divide a number, a binary shift moves all the digits in the binary number along to the right (0 ÷ is on right cuz left hand draw on right hand is harder symbol):
÷ 2, all digits shift 1 place right (add 0 on left)
÷ 4, 2 places right (2 0s)
÷ 8, 3 places right (3 0s)
To represent text digitally, each character needs its own unique bit-pattern (combinations of 1s and 0s) called a charactercode.
A character can be any of the following:
Letters (upper and lower case)
Punctuation (e.g. ?/|\£$)
Numbers (0–9)
Commands (e.g. Enter, Delete, F1)
For computers to be able to communicate + exchange text, they must have an agreed standard that defines which character code is used for which character. A standardised collection of characters and the bit-patterns used to represent them is called a characterset (eg ASCII, Unicode)
ASCII uses seven bits, giving a character set of 128 codes (32control codes and 96 characters). The characters are represented in a table, called the ASCII table.
Extended ASCII uses eight bits, giving a character set of 256 characters. This allows for special characters such as those with accents in languages.
While suitable for representing English characters, 256 characters is far too small to hold every character in other languages, such as Chinese or Arabic. Unicode uses 16 bits, giving a range of over 65,000 characters.
file size (bits) = bits per character x number of characters
file size (bytes) = bits per character x number of characters/8
A bitmap is an image formed from pixels. A pixel is the smallestelement that makes up an image (a singlepoint in an image)
The number of bits determines the range of colours. This is known as an image's colour depth. For example, using a colour depth of 3, ie 3 bits per pixel, would allow 8 possible colours (2^8)
Meta data is dataaboutdata. For a file, metadata can include:
• type of file (eg bitmap)
• file size (eg 3 Mb)
• date created (eg 20-12-2017)
For images, metadata will include:
• colour depth
• image height and width (in pixels)
• image resolution (in ppi)
• image type (eg JPEG)
Minimum Bitmap File Size (bits) = Width x Height x ColourDepth
Size in bytes = size in bits ÷8
Amplitude = A measurement of sound
Sample = Measure of amplitude at a specific time
Bit depth = Number of bits used for each sample
Sample rate = Number of samples per second measured in Hz
Sound begins life in an analogue format. This means it has no discrete (exact) value and varies continuously. It can be represented in the form of a wave. An ADC will capture a sound wave at regular time intervals. This recording is known as a sample.
bit rate (bits per second) = samplerate x bitdepth
file size (bits) = samplerate x bitdepth x seconds
file size (bits) = bitrate x seconds
Lossy compression, some data is removed + discarded, reducing overall amount of data AND the file size.
Image can reduce colourdepth (fewer shades of colour).
Audio file can be compressed by reducing the bitdepth of the samples. MP3 is a lossy audio file format.
Various lossy standards exist:
the JPEG file format works on this principle, which is why JPEG files tend to be smaller in size
the MPEG file format compresses audio and video, making it more suitable for streaming media
>MP3 is a lossy format for audio, including music
There are some files that we would not want to lose data from eg
text files
spreadsheets
financial records
emails
With lossless compression, files size reduce without loss of data. Lossless compression cannot compress files as much as lossy compression.