100 likes | 255 Vues
In this lesson, students will learn how to add 4-bit and 8-bit binary numbers and understand the concept of overflow errors. The objectives include mastering binary addition, successful addition of both 4-bit and 8-bit numbers, and discussing why overflow occurs. Through examples demonstrating carryover in binary addition, students will recognize the limits of binary representation and how overflow errors can lead to incorrect results. The session culminates with practical exercises and peer testing to reinforce learning.
E N D
Lesson Objectives • To understand how to add 4 and 8 bit binary numbers together • To understand what is meant by the term “Overflow” • ALL students will add 4 bit binary numbers successfully • MOST students will add 8 bit binary numbers successfully • SOME students will be able to discuss why overflow errors occur
Adding Denary Numbers + 2 8 1 7 1 Carryover What are the steps that we do to add 2 denary numbers together?
Adding Binary numbers 1+1 = 2 In binary this is 10 0+1 = 1 1+0 = 1 + 1 0 1 1 1 Carryover 0+0+1=1 We do it in exactly the same way
Always convert it back to denary to check the answer 8 4 2 1 5+ 6 11 + 1 0 1 1 1 Carryover
Task 1: When carrying over 1+1+1 = 3 = 11 Have a go at the additions in your book. Remember that in binary 0+0=0 1+0=1 0+1=1 1+1=2=10
Overflow Errors • Sometimes we run into problems. • Suppose we have eight bits in each location. • When we add the binary equivalent of denary 150 + 145: • There is no room for a carry so it is lost and we get the wrong answer, 39 instead of 295. • When there isn’t enough room for a result, this is called overflow and produces an overflow error. Remember the maximum 8 bit binary number 255
On the front of your booklets Write down the definitions for Overflow Error
How did you do? A/A* - 8/8 8 bit correct B – 6/7 8 bit correct C – 4/5 8 bit correct D - 6/6 4 bit numbers
Plenary https://www.youtube.com/watch?v=OCYZTg3jahU
In pairs Count up the binary numbers using your fingers to represent the digits. Test each other –