How are numbers represented in binary and hexadecimal, including negatives, and how is binary arithmetic performed?
Data representation of numbers: converting between binary, denary and hexadecimal, representing negative numbers with sign and magnitude and two's complement, binary addition and subtraction, and detecting overflow.
An Eduqas Component 2 answer on number representation: converting between binary, denary and hexadecimal, representing negative numbers with sign and magnitude and two's complement, binary addition and subtraction, and detecting overflow.
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 fluent conversion between binary, denary and hexadecimal, representation of negative numbers in sign and magnitude and two's complement, binary addition and subtraction, and detection of overflow. This is a calculation-heavy dot point assessed without a calculator, so shown working is essential.
The answer
Binary, denary and hexadecimal
Representing negative numbers
Binary arithmetic and overflow
Examples in context
Memory addresses and colour values are written in hexadecimal because it is compact (the colour #FF8000 is three bytes). Two's complement is used inside every processor so one adder circuit can do both addition and subtraction, linking this directly to the logic-gate adders from Component 1. Overflow detection matters in real systems: an unchecked overflow can crash software or corrupt data. This dot point is the foundation for floating-point representation (next), which uses two's complement for both its mantissa and exponent.
Try this
Q1. Convert to denary. [1 mark]
- Cue. .
Q2. Represent in 8-bit two's complement. [2 marks]
- Cue. ; invert to ; add 1 to get .
Q3. Convert the denary number to hexadecimal. [1 mark]
- Cue. remainder , giving then , so (or ).
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 20195 marksUsing 8-bit two's complement, represent in binary, and add it to the 8-bit two's complement representation of , showing your working and interpreting the result.Show worked answer →
Represent (up to 3): start with . Invert all bits: . Add 1: . So .
.
Add (up to 2):
0010 1101 (+45)
+ 1110 1110 (-18)
-----------
0001 1011 (carry out of the 8th bit is discarded)
The 8-bit result is , correct since . Markers reward the correct two's complement of (invert and add 1), the binary addition, and discarding the final carry to read .
Eduqas 20215 marksConvert the hexadecimal number to denary and to binary, and convert the denary number to hexadecimal, showing your method.Show worked answer →
Hex to denary (up to 2): has digits and (). Value .
Hex to binary (up to 1): each hex digit maps to four bits, so and , giving .
Denary to hex (up to 2): remainder . and , so reading quotient then remainder gives . Check: . Markers reward the place-value method, the four-bit grouping for binary, and the divide-by-16 method with correct letter digits.
Related dot points
- Floating-point representation: storing a real number as a mantissa and an exponent in two's complement, evaluating a stored floating-point value, normalising a mantissa, and the trade-off between range and precision.
An Eduqas Component 2 answer on floating-point representation: storing a real number as a two's complement mantissa and exponent, evaluating a stored floating-point value, normalising a mantissa, and the trade-off between range and precision.
- Logical operations: the logic gates (AND, OR, NOT, NAND, NOR, XOR) and their truth tables, building and reading truth tables for expressions, the laws of Boolean algebra and De Morgan's laws, and simplifying expressions with Karnaugh maps.
An Eduqas Component 1 answer on logical operations: the six logic gates and their truth tables, building truth tables for expressions, simplifying with the laws of Boolean algebra and De Morgan's laws, and using Karnaugh maps to minimise a Boolean expression.
- Representing text, images and sound: character sets (ASCII and Unicode), bitmap images with resolution, colour depth and the file-size calculation, and sampled sound with sample rate, bit depth and the file-size calculation.
An Eduqas Component 2 answer on representing text, images and sound: the ASCII and Unicode character sets, bitmap images with resolution and colour depth and the file-size calculation, and sampled sound with sample rate and bit depth and the file-size calculation.
- Compression, encryption and error checking: lossy and lossless compression (run-length encoding and dictionary methods), symmetric and asymmetric encryption, and error-detection methods (parity, checksums and check digits).
An Eduqas Component 2 answer on compression, encryption and error checking: lossy versus lossless compression with run-length and dictionary methods, symmetric and asymmetric encryption, and error-detection methods including parity, checksums and check digits.
- Assembly language: the instruction set with its opcode and operand, common operations (load, store, add, jump, compare), the relationship between assembly and machine code, and immediate, direct and indirect addressing modes.
An Eduqas Component 2 answer on assembly language: the opcode and operand structure of an instruction, common operations such as load, store, add, jump and compare, how assembly maps to machine code via the assembler, and immediate, direct and indirect addressing modes.
Sources & how we know this
- WJEC Eduqas GCE AS/A Level Computer Science specification (from 2015) — Eduqas (2015)