Skip to main content
EnglandComputer ScienceSyllabus dot point

How do you convert between denary and binary, add binary numbers and use binary shifts?

Converting between denary and binary (up to and including 8 bits), binary addition and the detection of overflow, and binary shifts and their effect.

An OCR J277 1.2.4 answer on converting between denary and binary up to 8 bits, adding binary numbers and detecting overflow, and binary shifts and their effect on a value.

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. Place values and converting
  3. Binary addition and overflow
  4. Binary shifts
  5. Try this

What this dot point is asking

OCR wants you to convert between denary and binary up to 8 bits, add two binary numbers and say whether the result overflows, and perform binary shifts and state their effect. This is the core number work of Paper 1, so the methods must be quick and accurate, and you should always show working.

Place values and converting

Binary addition and overflow

Binary shifts

A left shift can cause data to be lost if a 1 is pushed off the left end (an overflow), and a right shift loses precision if a 1 falls off the right end (the remainder is discarded, so it is integer division). Shifts are used because they are a very fast way for the processor to multiply or divide by powers of two.

Try this

Q1. Convert the denary number 93 to 8-bit binary. [1 mark]

  • Cue. 64+16+8+4+1=9364 + 16 + 8 + 4 + 1 = 93, so 0101110101011101.

Q2. Add the 4-bit numbers 01100110 and 01010101, and state whether an overflow occurs in 4 bits. [2 marks]

  • Cue. 0110+0101=10110110 + 0101 = 1011 (6 + 5 = 11); it fits in 4 bits, so no overflow.

Q3. A number is left-shifted by 2 places. By what value is it multiplied? [1 mark]

  • Cue. 22=42^{2} = 4.

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 20213 marksConvert the denary number 178 into an 8-bit binary number. Show your working.
Show worked answer →

Use the 8-bit place values 128,64,32,16,8,4,2,1128, 64, 32, 16, 8, 4, 2, 1. Work from the largest, subtracting where the value fits.

178−128=50178 - 128 = 50, so the 128 column is 1. 50−32=1850 - 32 = 18, so the 32 column is 1 (64 does not fit). 18−16=218 - 16 = 2, so the 16 column is 1. 2−2=02 - 2 = 0, so the 2 column is 1. The remaining columns are 0.

Result: 1011001010110010. Check: 128+32+16+2=178128 + 32 + 16 + 2 = 178.

Markers reward the correct method (place values and subtraction) and the correct answer; a working shown lets you gain method marks even with a single slip.

OCR 20224 marksAdd the two 8-bit binary numbers 01001101 and 01100110. Give your answer and state whether an overflow has occurred, explaining your reasoning.
Show worked answer →

Add column by column from the right, carrying where the total is 2 or 3.

01001101+01100110=1011001101001101 + 01100110 = 10110011.

Check in denary: 01001101=7701001101 = 77 and 01100110=10201100110 = 102; 77+102=17977 + 102 = 179, and 10110011=17910110011 = 179, so the addition is correct.

Overflow: the result 1011001110110011 fits in 8 bits, so there is no overflow (no carry out of the 128 column into a 9th bit). Overflow occurs only when the result needs more bits than are available, that is when there is a carry out of the leftmost (most significant) column.

Markers reward the correct sum, the correct overflow judgement, and a reason (carry out of the most significant bit means the result will not fit in 8 bits).

Related dot points

Sources & how we know this