Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA REPRESENTATION – 3 binary addtion

Similar presentations


Presentation on theme: "DATA REPRESENTATION – 3 binary addtion"— Presentation transcript:

1 DATA REPRESENTATION – 3 binary addtion

2 Thought for the day – Alan Turing
Alan Turing ( ) was an English groundbreaking computer scientist, logicain and mathematician. He is often referred to as the father of theoretical computer science and well known for his work in artificial intelligence. During World War II, he worked for the Government Code and Cypher School at Bletchley Park where he became most famous for breaking the code of the German Enigma machine. This meant that messages between the German forces were known to the British and many attacks were averted and many thousands if not millions of lives saved. Many historians believe breaking that code shortened the war by as little as two years and some say as many as four years. In 1936, he came up with the idea of a machine that was able to compute anything that could be computed. This was known as the Turing Machine and led to the modern computer. During the late 1940s he worked in the University of Manchester in mathematics and computing. His experiment, the Turing test tried to devise an intelligence standard for technology.

3 Big Picture – Data Representation
In this topic, you need to understand: Units: bit, nibble, byte, kilobyte, megabyte, gigabyte, terabyte, petabyte The need for binary: how data needs to be converted into a binary format to be processed by a computer. How computers represent the following types of data: Numbers: binary and hexadecimal - number conversions and binary addition Characters: the use of binary codes to represent characters Images: how an image is represented as a series of pixels represented in binary Sound: how sound can be sampled and stored in digital form Compression

4 Learning Objectives By the end of today’s lesson, you will be able to:
LO1: Add two binary integers All of you will be able to add 2-bit numbers Most of you will be able to add 4-bit numbers Some of you will be able to add 8-bit numbers LO2: Most of you will also be able to explain overflow errors

5 Starter – Recap Binary On your whiteboards ….
Show your shoe size in binary Show the date of the month you were born in binary Show your age in binary Show the day you were born in binary Show the amount of siblings you have in binary Show your house number in binary 128 64 32 16 8 4 2 1

6 De-code these facts… More than % of the people in the world have never made or received a telephone call. Gorillas sleep as much as 1110 hours per day. You can tell the sex of a horse by its teeth. Most males have , females have On average, 1100 newborns will be given to the wrong parents daily. A giraffe can clean its ears with its inch tongue! A man named Charles Osborne had the hiccups for years! 128 64 32 16 8 4 2 1

7 Answers More than 50% of the people in the world have never made or received a telephone call. Gorillas sleep as much as fourteen hours per day. You can tell the sex of a horse by its teeth. Most males have 40, females have 36. On average, 12 newborns will be given to the wrong parents daily. A giraffe can clean its ears with its 21-inch tongue! A man named Charles Osborne had the hiccups for 69 years!

8

9 1 + 1 (carry 1) = 1 and you carry a 1
5 rules to remember: Binary addition sums 0+0 = 0, with no carry 1+0 = 1, with no carry 0+1 = 1, with no carry = 0, and you carry a 1 1 + 1 (carry 1) = 1 and you carry a 1

10 Adding binary numbers So let’s start with this sum: 0101 + 0010
First line the numbers up on your page so that the numbers with the same place values are directly underneath each other, like this: 0101 0010 Now, just the same as we do when we are doing denary addition in this way, we start on the right and work our way left, adding up the numbers as we go. So, = 1, we write a = 1 so we write a 1. We end up with the answer If you like, you can check you are right by converting the binary to denary and adding up the numbers in your head! 0101 = = 2 = 0111 which is 7

11 Now let’s try this one: 0101 + 0111
1 Carry over Answer Straight away we encounter a problem – the first sum we need to add up is – I bet you never thought you’d have trouble with that sum at school! This is binary so in this case the answer to is not 2 – we can’t use anything other than a 0 or a 1. So the answer to is 10. Not ten, but two, written in binary! Remember the headings from the binary table we used last week. We write a 0 (always the right most digit) underneath and carry the 1 to the next column Now this column is because of the remainder we carried. So it’s another 10 (2), so once again we will write a 0 and then carry the 1… Phew…this next column is even trickier! It’s ! What does that equal? Well it’s actually 3 which is 11 in binary! Write the 1 which is the right most digit underneath and carry the 1… Thank goodness, this last one’s easy. It’s so we can just write a 1. So the answer is 1100. 1 Carry over Answer 1 Carry over Answer 1 Carry over Answer

12 Have a go on your whiteboard
10+01

13 Overflow errors 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 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?

14 How to show you understand:
Make sure you have the explanation sheet and the worksheet. Work through the addition sums, then do the number conversion. If you need to, Go to Moodle>ICT & Computing>GCSE Computer Science 2016-Computational Thinking > iBytes 2.6 Data Representation>Units and Numbers (scroll down!) 3. Complete all questions on the worksheet from last week. Online timer to set target time for completion:

15 Plenary: BBC Bitesize Test
Link is on Moodle.

16 Homework Complete homeworks 12, 13, 14 Plus make sure 7 -11 are done
Due next Tuesday 31 Jan


Download ppt "DATA REPRESENTATION – 3 binary addtion"

Similar presentations


Ads by Google