top of page

4.3: Binary Calculations

Exam Board:

Eduqas / WJEC

Specification:

2020 + 

What are binary calculations?

Binary addition and binary subtraction are methods of adding or subtracting binary values without having to convert them into denary.

How to add binary numbers:

How to subtract binary numbers:

Overflow & Underflow Errors

Overflow and underflow errors occur when there is not enough space to accurately represent a binary number in the bits available.

What is an overflow error?

An overflow error occurs when a binary value is too large to be stored in the bits available.

 

In technical terms, an overflow error occurs if a carry (remainder) is present on the most significant bit (MSB). 

​

The CPU then sets the overflow flag to true.

The most significant bit (MSB) is the largest bit (always the one furthest to the left) of a binary value (e.g. 128 for an 8 bit value).

​

A flag is an alert signal. It is either on or off. The overflow flag is turned on by the CPU when an overflow occurs.

What is an underflow error?

An underflow error occurs when a number is too small to be stored in the bits available. The value is too close to 0 to be accurately represented in binary.

Monochrome on Transparent.png

Questo's Questions

4.3 - Binary Calculations:

​

1a. Describe the terms 'most significant bit' and 'flag'. [2]

1b. Using the terms from 1a, explain what an overflow error is. [2]

1c. Describe what is meant by an underflow error.  [2]

​

2. Add together the following binary values. If an overflow error occurs you must state one has occurred.

  • a. 010110012 and 010001012  [2]

  • b. 110110112 and 010111012  [2]

  • c. 001101102 and 011010112  [2]

  • d. 110110112 and 010101112  [2]

  • e. 011011012 and 110101102  [2]

​

3. Subtract the following binary values; put the first value on top of the second value:

  • a. 100110102 and 000110002 [2]

  • b. 110110112 and 010111012 [2]

  • c. 011101102 and 011010112 [2]

  • d. 110110112 and 010101112 [2]

  • e. 111011012 and 110101102 [2]

Watch on YouTube

Watch on YouTube

bottom of page