Question bank › A-level › A-level Computer Science › Fundamentals of data representation

Unsigned binary, binary arithmetic and two's complement

10 questions38 marksabout 45 min

Answer on paper first, then reveal the mark scheme one mark at a time.

1Core3 marks

An 8-bit register stores signed integers using two's complement.

(a) Show how the denary value −45 is represented in this register. [2]

(b) State the range of denary values that can be stored in an 8-bit two's complement register. [1]

2Core5 marks

Two numbers are stored as 8-bit two's complement integers:

A = 01101011    B = 11100110

(a) Convert B to denary. [2]

(b) Add A and B using binary addition, giving your answer as an 8-bit binary number. Show any carry that is discarded. [2]

(c) Convert your answer to (b) to denary. [1]

3Core3 marks

A stock-control system stores the number of items in each storage bay as an unsigned binary integer. No bay can ever hold more than 300 items.

(a) State the minimum number of bits needed to store the number of items in a bay. [1]

(b) The designers decide to use 12 bits instead. State the largest value that can be stored in 12-bit unsigned binary, giving your answer in denary. [1]

(c) State a general expression for the largest value that can be represented using $n$ bits in unsigned binary. [1]

Stuck on Unsigned binary, binary arithmetic and two's complement?

Get it sorted in a free 30-minute session

We work through your weakest questions on this topic on Zoom. I reply the same day.

4Core3 marks

Two values are stored in 8-bit unsigned binary:

P = 10110110    Q = 01011101

(a) Add P and Q using binary addition. Show your working. [2]

(b) The result must be stored in an 8-bit register. Explain the problem that occurs. [1]

5Standard3 marks

Multiply the unsigned binary numbers 1011 and 1101. Show your working and give your answer in unsigned binary. [3]

6Standard4 marks

A processor performs subtraction by adding the two's complement of the second number.

Using 8-bit two's complement binary, calculate 00110100 − 01011001. Show your working and give your answer in both binary and denary. [4]

7Standard3 marks

A 6-bit register holds integers in two's complement.

(a) State the most negative value and the most positive value that can be stored, in denary. [2]

(b) Explain why the range is not symmetrical about zero. [1]

8Hard4 marks

A program stores two temperatures as 8-bit two's complement integers: 01100100 and 01010000.

(a) The processor adds them and stores the 8-bit result. Show the result in binary and state the denary value it represents. [2]

(b) Explain why this result is incorrect and how the processor could detect this, using only the most significant bits of the two inputs and the result. [2]

9Hard4 marks

The 8-bit two's complement value 11101011 is to be copied into a 16-bit register.

(a) Convert 11101011 to denary. [1]

(b) Write down the 16-bit two's complement pattern that represents the same value, and explain why the extra bits must have the value you have chosen. [2]

(c) The original 8-bit pattern is shifted one place to the left, with a 0 entering on the right. State the denary value of the new 8-bit pattern. [1]

10Stretch6 marks

The diagram shows the bit pattern currently stored in register R1.

(a) State the denary value of R1 if it is interpreted as (i) an unsigned integer and (ii) a two's complement integer. [2]

(b) R1 is added to itself and the result is stored back in the 8-bit register. Give the 8-bit result. [1]

(c) Discuss whether the result in (b) is correct under each interpretation in (a). [3]

Register R1 (8 bits)1b70b60b51b40b31b21b10b0most significant bitleast significant bit

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session