Upload
linda-robinson
View
218
Download
0
Embed Size (px)
DESCRIPTION
GCSE Computing#BristolMet Overflow Overflow – when a number becomes too large to fit into the number of bits allocated it is said to ‘overflow’ and some bits are ‘lost’ leaving an incorrect value. For example: Carry 1 1 In this case we need a 9 th column and if the computer only stored 8 bits to store numbers this would the carry from the 8 th column would be lost. This is called overflow – the calculation has overflowed the available space. REVISION: What is the largest number we can store in 8 bit binary?
Citation preview
GCSE Computing#BristolMet
Session Objectives#8
MUST add two 8-bit binary integers
SHOULD explain overflow errors
COULD provide solutions to limit overflow errors
GCSE Computing#BristolMet
Adding binary numbers
Adding binary numbers uses the same method as addition in Base10 where you carry 1 across e.g 3 6 7+ 2 8 4
6 5 1Carry 1 1However, in binary remember: Base 10 Binary
1 0 1 2 1 0 3 1 1
Therefore in 4 bit binary: 1 0 1 1 + 1 1 0 1 1 1 0 0 0
Carry 1 1 1 1 Requires another bit
GCSE Computing#BristolMet
Overflow
Overflow – when a number becomes too large to fit into the number of bits allocated it is said to ‘overflow’ and some bits are ‘lost’ leaving an incorrect value.
For example:
1 1 0 0 0 0 1 0+ 1 0 1 1 1 0 1 0
0 1 1 1 1 1 0 0 Carry 1 1
In this case we need a 9th column and if the computer only stored 8 bits to store numbers this would the carry from the 8th column would be lost. This is called overflow – the calculation has overflowed the available space. REVISION: What is the largest number we can store in 8 bit binary?
GCSE Computing#BristolMet
Adding binary examples
TASK: Complete addition questions worksheet and test your answers using decimals
ANSWERS Q1
Q2