Skip to main content
EnglandComputer ScienceSyllabus dot point

What are the main data types, and how do the arithmetic, relational and logical operators work?

Variables and constants, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators used in programs.

An Eduqas GCSE Computer Science answer on variables and constants, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators, including integer division and modulus.

Generated by Claude Opus 4.810 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Variables and constants
  3. Data types
  4. Operators
  5. Why DIV and MOD are useful
  6. Try this

What this dot point is asking

Eduqas wants you to know what variables and constants are, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators, including integer division (DIV) and modulus (MOD). Choosing the right data type for given data and evaluating operator expressions are recurring Component 1 and Component 2 skills.

Variables and constants

Data types

Operators

Why DIV and MOD are useful

Try this

Q1. State an appropriate data type for storing whether a light is on or off. [1 mark]

  • Cue. Boolean (true or false).

Q2. State the value of 19 MOD 419 \text{ MOD } 4. [1 mark]

  • Cue. 33 (the remainder when 1919 is divided by 44).

Q3. State the result of (6>2) OR (1>9)(6 > 2) \text{ OR } (1 > 9). [1 mark]

  • Cue. True (6>26 > 2 is True, and OR needs only one to be true).

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas Component 1, 20224 marksState an appropriate data type for each of the following and justify one choice: a person's age, a price in pounds and pence, whether a user is logged in, and a person's surname.
Show worked answer →

Age: integer (a whole number) (1 mark). Price in pounds and pence: real/float (it has a fractional part) (1 mark). Whether logged in: Boolean (true or false) (1 mark). Surname: string (a sequence of characters) (1 mark).

A justification might be: a price needs a real type because it can have decimal places such as 4.99, which an integer could not store exactly.

Markers reward each type matched correctly. Using a string for the age, or an integer for a price, loses the mark.

Eduqas Component 1, 20234 marksState the result of each expression: 17 DIV 5, 17 MOD 5, 7 > 3, and (5 > 2) AND (4 > 9).
Show worked answer →

17 DIV 5 = 3 (integer division gives the whole-number quotient) (1 mark).

17 MOD 5 = 2 (modulus gives the remainder) (1 mark).

7 > 3 = True (a relational operator gives a Boolean) (1 mark).

(5 > 2) AND (4 > 9): 5 > 2 is True, 4 > 9 is False, True AND False = False (1 mark).

Markers reward the correct DIV/MOD distinction (quotient versus remainder) and the Boolean results. Confusing DIV and MOD is the common error.

Related dot points

Sources & how we know this