DATA REPRESENTATION – 3 binary addtion

Slides:



Advertisements
Similar presentations
Base 10 Denary Decimal
Advertisements

A-Level Computing#BristolMet Session Objectives#8 express numbers in binary, octal and hexadecimal explain the use of code to represent a character set.
Chapter 4.2 Binary numbers: Arithmetic
Task Show your shoe size in binary
Binary Aim: Explain binary and binary units Objective 1: Convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa Objective.
Revision tip: Focus on the things you find difficult first.
Digital Data Patrice Koehl Computer Science UC Davis.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Abstraction – Number Systems and Data Representation.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Binary Arithmetic In today’s lesson we will look at: a reminder of how binary works adding binary numbers overflow complements negative numbers and subtraction.
LO To learn basic computer coding using binary
name-picker/47_5KcDj3 © Mrs G Hemel.
Number Systems Revision of conversations What is a register Addition Complementation.
Do it now activity Can you work out what the missing symbols are and work out the order they should be in if the table shows smallest to largest KB kilobyte.
GCSE Computing: A451 Computer Systems & Programming Numbers Representation of Data in Computer Systems.
Candidates should be able to:
A)Convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa b)Add two 8-bit binary integers and explain overflow errors which.
GCSE Computing#BristolMet Session Objectives#8 MUST add two 8-bit binary integers SHOULD explain overflow errors COULD provide solutions to limit overflow.
2.1.4 Data Representation Units.
Units Representation of Data in Computer Systems.
BINARY Toby Wilson. LEARNING OBJECTIVES  Be able to convert binary to denary  Be able to convert denary into binary  Be able to explain how computers.
Lesson Aim (Data representation) To be able to: Convert B/D & D/B Convert D/H & H/D Convert H/B & B/H Perform simple binary arithmetic Represent a number.
Show your shoe size in binary 2. Show the date of the month you were born in binary 3. Show your age in binary 4. Show your height in.
OBJECTIVES 1.Be able to recognise binary code 2. Be able to convert denary numbers into binary numbers.
STARTER – CRACK THE CODE
Number systems. Binary system. Bits and bytes. Modern computers “speak” in a digital language composed of 2 digits. The machine language of modern computers.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
© OCR 2016 Unit 2.6 Data Representation Lesson 1 ‒ Numbers.
DATA REPRESENTATION - TEXT
Math Review Do you remember, from math class, how exponentiation operations are typically represented? an a is known as the "base" n is known as the "exponent".
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Understanding binary Understanding Computers.
Binary and Logic Computers use electrical signals that are on or off, so they have to see everything as a series of binary numbers. This data is represented.
Binary, Denary, Hexadecimal Conversion Binary Addition
Arithmetic Shifts and Character Representation
Lesson Objectives Aims You should be able to:
Lesson 1-15 AP Computer Science Principles
3.1 Denary, Binary and Hexadecimal Number Systems
Lesson Objectives Aims
COMP 1321 Digital Infrastructure
Representation of data in computer systems
Intermediate 2 Computing
BITS & BYTES.
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
3 - STORAGE: DATA CAPACITY CALCULATIONS
Denary to Binary Numbers & Binary to Denary
…to GCSE Level with Python Sue Sentance
Lesson Objectives Aims You should be able to: Convert Denary to Binary
Folders out, planners out…
Data Representation Numbers
Representation of Data in Computer Systems
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.
Data Representation Revision
Fundamentals of Data Representation
Task Show your shoe size in binary
Data Representation Conversion 05/12/2018.
BITS & BYTES.
Fundamentals of Data Representation
(return of the…) Data blast
Lesson 3: Denary to Binary Conversion.
Abstraction – Number Systems and Data Representation
Hexadecimal.
LO1 – Understand Computer Hardware
Binary It’s all 0’s and 1’s.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Signed Integers.
WJEC GCSE Computer Science
Theory: 2.6 – Data Representation
Section 6 Primitive Data Types
Presentation transcript:

DATA REPRESENTATION – 3 binary addtion

Thought for the day – Alan Turing Alan Turing (1912 - 1954) 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.

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

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

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

De-code these facts… More than 110010% 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 101000, females have 100100. On average, 1100 newborns will be given to the wrong parents daily. A giraffe can clean its ears with its 10101 inch tongue! A man named Charles Osborne had the hiccups for 1000101 years! 128 64 32 16 8 4 2 1

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!

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 1+1 = 0, and you carry a 1 1 + 1 (carry 1) = 1 and you carry a 1  

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 + 0 = 1, we write a 1. 0 + 1 = 1 so we write a 1. We end up with the answer 0111. If you like, you can check you are right by converting the binary to denary and adding up the numbers in your head! 0101 = 5 + 0010 = 2 = 0111 which is 7

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 1 + 1 – I bet you never thought you’d have trouble with that sum at school! This is binary so in this case the answer to 1 + 1 is not 2 – we can’t use anything other than a 0 or a 1. So the answer to 1 + 1 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 0 + 1 + 1 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 1 + 1 + 1! 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 0 + 0 + 1 so we can just write a 1. So the answer is 1100. 1 Carry over Answer 1 Carry over Answer 1 Carry over Answer

Have a go on your whiteboard 10+01 001+100 101+101 111+001 1010+1100 1111+0001

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: 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?

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: http://www.classtools.net/education-games-php/timer

Plenary: BBC Bitesize Test http://www.bbc.co.uk/education/guides/z26rcdm/test Link is on Moodle.

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