Learn > Higher Computing Science > Computer Systems > Data representation

Data representation

Everything a computer stores — text, numbers, images, and sound — is converted into binary (1s and 0s). This is called data representation. At Higher level, you build on this by learning more advanced ways data is stored, including how computers handle negative numbers, very large or small values, and a wider range of characters.

Binary & two’s complement

Binary is still used to represent numbers, but at Higher you must also understand negative numbers using two’s complement.

  • The leftmost bit shows the sign (0 = positive, 1 = negative)
  • Allows both positive and negative integers to be stored
  • You must be able to convert between binary and denary
  • You should know the range of values for a given number of bits

Mantissa and exponent

Floating-point representation is used to store real (decimal) numbers. It splits the number into two parts: the mantissa, which stores the digits and controls accuracy, and the exponent, which controls the size of the number by moving the decimal point. More mantissa bits give better accuracy, while more exponent bits allow a larger range numbers to be stored.

Unicode and ASCII

Text is stored using Unicode instead of just ASCII.

  • Supports many more characters (languages, emojis, symbols)
  • ASCII (8-bit) is limited to 256 characters
  • Unicode is needed for modern global computing

Bitmap and vector graphics

Images can be stored as bitmap or vector graphics.

Bitmap images use pixels, allowing high detail but loss of quality when resized.
Vector images use shapes and instructions and can be resized without losing quality.