Coding Text & Graphics

Cards (29)

  • Characters are represented using character codes; they are assigned a number. Computers render this in binary, eg if M = 13, then it would be 1101
  • ASCII is one commonly used coding set. It uses 7 bits to represent 128 characters. The capital letter A is 65, and the alphabet continues in sequence
  • ASCII can only represent a limited number of characters in English, so it cannot represent other alphabets across the world
  • Unicode was introduced to represent all characters universally. It uses 1 - 6 bytes, meaning it can represent a ridiculous amount of characters
  • When transferring data, is it possible for it to be corrupted. Therefore we need to use error checking
  • A parity bit is added to data to ensure that the binary value is either even or odd, depending on the parity. If a bit is flipped, this will not be true, and the error will be detected
  • If an even amount of bit flips happen, the parity will be correct even though data was corrupted, so parity bits cannot be the only method of error checking used
  • With majority voting, bits are sent multiple times (usually 3). If a bit isn't consistent, it is assumed the most frequent bit is the correct one
  • Majority voting fails if two out of three bits are flipped, as this now appears to be the correct bit
  • Majority voting requires data to be transmitted multiple times, which can significantly slow down transmission speeds
  • A checksum is an algorithm applied to a unit of data that creates a checksum value. This is transmitted with the data, and the algorithm is applied again at the other end; if the checksums match, it is considered successful.
  • There is no standardised checksum; different systems will use different algorithms
  • A check digit is a single digit added at the end of a string. It is similar to a checksum but can detect less errors. It is often used for strings that may be input manually eg ISBNs on books
  • Bits are just transmitted as changing electrical signals. They can represent anything; what matters is how they are interpreted.
  • Images can be represented as bitmaps or vectors
  • Bitmaps use discrete individual pixels combined to create an image
  • Vectors draw an image from mathematical equations and lists of information
  • The size of an image refers to its width x height in pixels
  • Resolution is the number of dots per inch, where a dot is a pixel
  • Colour depth is the number of bits needed to store each pixel
  • Sometimes, the word resolution is used to refer to the size of an image
  • We can calculate the minimum storage requirements for a bitmap image with size x colour depth
  • File size may be bigger in practice due to metadata stored in the image file
  • Metadata is data about data
  • Metadata might include width, height, colour depth, file size, file name, author, creation date...
  • Vectors could be stored as text files. They only render the image when in use, storing properties in drawing lists
  • Typical vector properties include line and fill colour, line weight, coordinates, radius or height/width etc
  • Vectors can remain at very small file sizes, and can be scaled infinitely without losing quality. However it is difficult to represent complex images with them, so they are best suited for simple designs and logos
  • Bitmaps can easily store very detailed images and it is easy to edit individual pixels. For this reason they are best for photos and other high-quality or complicated images