# GCSE Computing Theory © gcsecomputing.net 1 GCSE Computing 2.14 Data Representation Binary Arithmetic.

## Presentation on theme: "GCSE Computing Theory © gcsecomputing.net 1 GCSE Computing 2.14 Data Representation Binary Arithmetic."— Presentation transcript:

GCSE Computing Theory © gcsecomputing.net 1 GCSE Computing 2.14 Data Representation Binary Arithmetic

Learning Objectives: 2 add two 8-bit binary integers explain overflow errors which may occur GCSE Computing GCSE Computing Theory © gcsecomputing.net

Decimal Arithmetic Rules 3 ADDdenarydenary sum 3 + 4 = 7= 7 7 + 8 = 15= 5 (carry 1) GCSE Computing GCSE Computing Theory © gcsecomputing.net

Adding Decimal Numbers 4 3 4 7 Carry + GCSE Computing GCSE Computing Theory © gcsecomputing.net

Adding Decimal Numbers 5 7 8 5 1 Carry + 1 GCSE Computing GCSE Computing Theory © gcsecomputing.net

Binary Arithmetic Rules 6 ADDdenarybinarybinary sum 0 + 0 = 0= 00= 0 0 + 1 = 1= 01= 1 1 + 0 = 1= 01= 1 1 + 1 = 2= 10= 0 (carry 1) 1+1+1 = 3= 11= 1 (carry 1) GCSE Computing GCSE Computing Theory © gcsecomputing.net

Adding Binary Numbers 7 1100 1010 0110 1 Carry 12 10 22 + + Decimal AdditionBinary Addition 1 GCSE Computing GCSE Computing Theory © gcsecomputing.net

Adding Binary Numbers 8 1111 1010 1001 1 Carry 15 10 25 + + Decimal AdditionBinary Addition 1 GCSE Computing 1 1 GCSE Computing Theory © gcsecomputing.net

Overflow in Binary Number Addition 9 1100 1010 0110 1 Carry 12 10 6 + + Decimal AdditionBinary Addition GCSE Computing If we only have 4 bits to store the result there would be no room for a carry, so it is lost and we get the wrong answer. When there isn’t enough room for a result, this is called an overflow and it produces an overflow error. GCSE Computing Theory © gcsecomputing.net