What mathematical tools (sets, logic and quantitative comparison) underpin computer science?
Mathematical skills for computer science: set theory and set operations, the comparison of binary, denary and hexadecimal magnitudes, simple logic propositions, and the use of these tools to reason about data and algorithms.
An OCR H446 answer on the mathematical skills underpinning computer science: set theory and set operations, comparing magnitudes across binary, denary and hexadecimal, simple logic propositions, and applying these tools to reason about data and algorithms.
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
OCR wants the mathematical skills that support the course: set theory and its operations, comparing magnitudes expressed in binary, denary and hexadecimal, and simple logic propositions, used to reason about data and algorithms. Expect a set-operations question and a "put these values in order" question across number bases.
The answer
Set theory and set operations
Comparing magnitudes across number bases
Logic propositions
Examples in context
Database queries are set operations: a join's matching rows are an intersection, and combining result sets is a union. Type systems define the set of values a variable may hold. Comparing file sizes or addresses given in hex and denary needs base conversion first. Logical propositions are the conditions in every if-statement. OCR links these skills to number representation, to Boolean algebra and logic, and to reasoning about algorithm efficiency with Big-O.
Try this
Q1. For and , state . [1 mark]
- Cue. (the elements in both sets).
Q2. Put and in ascending order, showing your reasoning. [2 marks]
- Cue. ; , so the order is then .
Q3. State what the union of two sets contains. [1 mark]
- Cue. All elements that are in either set (or both), each listed once.
Exam-style practice questions
Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
OCR 20205 marksTwo sets are and . State the union, the intersection and the difference , and explain what the intersection represents.Show worked answer →
Union (1 mark): (all elements in either set, listed once).
Intersection (1 mark): (elements in both sets).
Difference (1 mark): (elements in but not in ).
Meaning of intersection (up to 2): the intersection is the set of elements common to both sets, here the values that appear in both and . Markers reward the three correct sets and a correct description of intersection as the common elements. A common error is including duplicates in the union or confusing intersection with union.
OCR 20214 marksPlace the following values in ascending order, showing your reasoning: the binary number , the hexadecimal number , and the denary number .Show worked answer →
Convert to a common base (up to 3): in binary . in hex . The denary value is .
Order (1 mark): , so ascending order is , then and (which are equal at ). Markers reward converting all three to denary and the correct ordering, noting that the binary and hex values are equal. A common error is comparing the raw digit strings without converting.
Related dot points
- Primitive data types (integer, real/float, Boolean, character, string) and how text is represented using character sets such as ASCII and Unicode, including the size and range implications of each type.
An OCR H446 answer on primitive data types and text representation: the integer, real, Boolean, character and string types and their storage, and how characters are represented in binary using character sets such as ASCII and Unicode, with their size and range implications.
- Data structures: arrays, records, tuples and lists, the stack and queue abstract data types and their operations, linked lists, trees and graphs, and hash tables, including how each is used and its advantages.
An OCR H446 answer on data structures: arrays, records, tuples and lists, the stack and queue abstract data types with their operations, linked lists, trees, graphs and hash tables, including how each is used and its advantages and disadvantages.
- Number systems: binary, denary and hexadecimal conversion, representing negative numbers with sign and magnitude and two's complement, binary addition and subtraction, fixed-point binary fractions, and the use of hexadecimal and bitwise masks.
An OCR H446 answer on number systems: converting between binary, denary and hexadecimal, representing negative numbers with sign and magnitude and two's complement, binary addition and subtraction, fixed-point binary fractions, and the use of hexadecimal and bitwise masks.
- Logic gates (AND, OR, NOT, XOR, NAND, NOR) and their truth tables, constructing and interpreting truth tables, and simplifying Boolean expressions using the laws of Boolean algebra including De Morgan's laws, distribution, association and commutation, and Karnaugh maps.
An OCR H446 answer on Boolean algebra and logic: the logic gates (AND, OR, NOT, XOR, NAND, NOR) and their truth tables, constructing truth tables for an expression, and simplifying Boolean expressions using the laws of Boolean algebra, De Morgan's laws and Karnaugh maps.
- Big-O notation for time and space complexity: the constant, logarithmic, linear, linearithmic, polynomial and exponential complexity classes, how to determine the Big-O of an algorithm, and using it to compare and judge the suitability of algorithms.
An OCR H446 answer on Big-O notation: the constant, logarithmic, linear, linearithmic, polynomial and exponential complexity classes for time and space, how to determine an algorithm's Big-O, and using it to compare algorithms and judge their suitability.