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.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
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 . [1 mark]
- Cue. (the remainder when is divided by ).
Q3. State the result of . [1 mark]
- Cue. True ( 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
- The purpose and functions of an operating system (memory management, multitasking, peripheral management, the user interface, and security and user management) and the role of common utility software.
An Eduqas GCSE Computer Science answer on the purpose and functions of an operating system (memory management, multitasking, peripheral management, the user interface, security and user management) and the role of common utility software.
- High-level and low-level languages, machine code and assembly language, the three translators (compiler, interpreter and assembler), and the features of an integrated development environment (IDE).
An Eduqas GCSE Computer Science answer on high-level versus low-level languages, machine code and assembly, the three translators (compiler, interpreter, assembler) with their differences, and the features of an integrated development environment.
- The three programming constructs: sequence, selection (if and nested if) and iteration (count-controlled and condition-controlled loops), and when to use each.
An Eduqas GCSE Computer Science answer on the three programming constructs: sequence, selection (if, else, nested if) and iteration (count-controlled for loops and condition-controlled while loops), with worked pseudocode for each.
- Arrays as a data structure: declaring and using one-dimensional arrays, accessing elements by index, and iterating through an array with a loop, with awareness of two-dimensional arrays.
An Eduqas GCSE Computer Science answer on arrays as a data structure: declaring and using one-dimensional arrays, accessing elements by index, iterating through an array with a loop, and awareness of two-dimensional arrays.
- The logic operators AND, OR and NOT, their logic gates and truth tables, and combining them in simple logic circuits and Boolean expressions of up to three inputs.
An Eduqas GCSE Computer Science answer on the AND, OR and NOT logic gates and their truth tables, and how to build and evaluate simple logic circuits and Boolean expressions of up to three inputs.
Sources & how we know this
- WJEC Eduqas GCSE Computer Science specification (from 2016) — Eduqas (2020)