1.1 Number systems
- Any form of data needs to be converted to binary to be processed by a computer
- Data is processed using logic gates, then stored in registers
- Binary (ONLY 1s and 0s) make electronic components
o Easier to manufacture
o Cheaper
o More reliable
Number systems:
- Denary to binary = can the remaining number go into left bits?
- Denary to hex = Denary to binary, change binary to 2 bytes and convert to hex
- Hex to denary = each hex value to binary nibble, combine nibbles and convert to denary
- Hex is used for colour codes (RGB values), debugging, IP address, MAC address,
ASCII/Unicode and URLs
- Easier for humans to understand
Binary:
0+0=0
0+1=1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry
- Overflow error will occur is value is greater than 255 in a 8-bit register
- Devices have a pre-defined limit that they can store (e.g. 16 bits)
- Binary shifts are used to multiply/divide binary by powers of two
Two’s Compliment:
- All positive binary numbers always start with a 0
- MSB (left) becomes -128
1. Write out positive version
2. Starting from the RIGHT, digits are same until and INCLUDING the first 1
3. Then flip every value
1.2 Text, sound and images
Character set: set of defined characters recognised by a computer
- Each character is a unique binary number
ASCII: 7-bit character set with 128 characters
Unicode: 24-bit character set with over 16 million characters
- Unicode allows for greater range of characters than ASCII
- Requires more bits per character than ASCII
Sound waves are sampled and converted to binary for computer processing
Sample rate: sample store/second (higher the sample rate, high the quality and larger the file)
Sample resolution: bits per sample
- Recording accuracy increases with sample rate + resolution
Sound file size = sample rate x sample resolution x length of sample/s
- Images are pixels (bitmap) converted to binary, processed by computer
Resolution: number of pixels in image (area)
Colour depth: number of bits used to represent each colour (2^n, n = no. of bits)
- File size and image quality increases with resolution and colour depth
Image file size = resolution x colour depth
- Metadata is stored with images
, 1.3 Data storage and compression
Data storage is measured in bits, nibbles, bytes, kilobytes, up to terabytes, petabytes, and exabytes
- Each goes up by 1024
Compression exists to reduce the size of the file so it requires less
- Bandwidth
- Storage space
- Transmission time
Lossless compression: reduces file size without permanent data loss with RLE (run length encoding)
- Used on all data types, less effective at reducing file size, mostly for text
Lossy compression: reduces files size by permanently removing data
- Reduce sample rate/colour depth/resolution
- Reduces file quality, NOT suitable for text