Data representation - EduqasData types

Binary data can represent numbers, graphics, sound and characters. It is then organised and manipulated differently. Data can also be stored in arrays, records or external files and go through validation or verification checks to ensure accuracy.

Part ofComputer ScienceUnderstanding Computer Science

Data types

A defines what sorts of values can be stored and how that can be used. The main data types are:

  • integer
  • Boolean
  • real
  • character
  • string

Integer

Integer data can only store whole numbers - it will not store decimal places. The numbers can be positive (for example, 26) or negative (for example, -26) numbers.

Boolean

Boolean data can be in one of two states. Most commonly this is TRUE or FALSE, but it can also be 1 or 0, or YES or NO.

Real

Real data stores numbers that allow decimal places, such as 5.3 or 12.0.

Character

A character data type allows only a single digit or character. This can include numbers, letters (both upper and lower case) and special symbols (eg £, &, @).

String

A string can contain one or more characters (eg Hello, ABC123).