Theory: 2.6 – Data Representation

Slides:



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

Base 10 Denary Decimal
Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.
COE 202: Digital Logic Design Signed Numbers
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Addition of two binary numbers = = = = 39.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
1 Binary Arithmetic, Subtraction The rules for binary arithmetic are: = 0, carry = = 1, carry = = 1, carry = = 0, carry =
1 Binary Numbers Again Recall that N binary digits (N bits) can represent unsigned integers from 0 to 2 N bits = 0 to 15 8 bits = 0 to bits.
© GCSE Computing Candidates should be able to:  convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa  add two 8-bit.
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Simple Data Type Representation and conversion of numbers
Numbers and number systems
A-Level Computing Data representation. Objectives Know how data can be represented in a computer system Understand the need for various forms of representation.
BINARY ARITHMETIC Binary arithmetic is essential in all digital computers and in many other types of digital systems.
Number Systems Part 2 Numerical Overflow Right and Left Shifts Storage Methods Subtraction Ranges.
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.
BR 8/99 Binary Numbers Again Recall than N binary digits (N bits) can represent unsigned integers from 0 to 2 N bits = 0 to 15 8 bits = 0 to 255.
ECE 2110: Introduction to Digital Systems Signed Addition/Subtraction.
Operations on Bits Arithmetic Operations Logic Operations
Number Systems Revision of conversations What is a register Addition Complementation.
Data Representation in Computer Systems. 2 Signed Integer Representation The conversions we have so far presented have involved only positive numbers.
07/12/ Data Representation Two’s Complement & Binary Arithmetic.
Addition and Substraction
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
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.
Digital Representations ME 4611 Binary Representation Only two states (0 and 1) Easy to implement electronically %0= (0) 10 %1= (1) 10 %10= (2) 10 %11=
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
GCSE Computing#BristolMet Session Objectives#8 MUST add two 8-bit binary integers SHOULD explain overflow errors COULD provide solutions to limit overflow.
Introduction to Digital Electronics Lecture 2: Number Systems.
Two’s and one’s complement arithmetic CLOCK ARITHMETIC.
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.
CPS120: Introduction to Computer Science Computer Math: Addition and Subtraction.
Integer Operations Computer Organization and Assembly Language: Module 5.
09/03/20161 Information Representation Two’s Complement & Binary Arithmetic.
Introduction to Number Representation A451 GCSE Computing.
ECE 3110: Introduction to Digital Systems Signed Number Conversions and operations.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Binary Addition The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple, using a form of carrying:
WHAT IS BINARY? Binary is a number system that only uses two digits: 1 and 0. Any information that processed by a computer it is put into sequence of.
Floating Point Representations
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
CHAPTER 9 COMPUTER ARITHMETIC - ALU
3.1 Denary, Binary and Hexadecimal Number Systems
…to GCSE Level with Python Sue Sentance
Binary & Hexidecimal Numbers
A Level Computing Component 2
Addition and Substraction
Lesson Objectives Aims You should be able to: Convert Denary to Binary
Binary Arithmetic.
Topic 3: Data Binary Arithmetic.
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.
Teaching Computing to GCSE
Binary Math Basic operations.
Topic 3: Data Hexadecimal.
Binary “There are 10 types of people in the world: Those who understand binary, and those who don't.”
Binary  Name: Class: .
BINARY ADDITION How it works.
Hexadecimal.
Binary It’s all 0’s and 1’s.
Data Binary Arithmetic.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Signed Integers.
Chapter3 Fixed Point Representation
Binary.
Chapter 2-2 Adding Integers
Two’s Complement & Binary Arithmetic
Adding integers without number line 2 digit.
Presentation transcript:

Theory: 2.6 – Data Representation Binary Addition

Rules of binary addition 0 + 0 = 0 0 + 1 = 1 1 + 1 = 0 carry 1 (2) 1 + 1 + 1 = 1 carry 1 (3) If the answer to the addition does not fit in 8 bits, the last carry bit causes an overflow error. You can check your answers by converting the numbers.

Example 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 0 + 1 1 1 1 1 0 0 1 0 1 0 1 0 If there is a carry bit left over, it is called an overflow error… …and you get the wrong answer. Zero + zero + carry = one Zero + one + carry = zero carry 1 Zero + one + carry = zero carry 1 One + one + carry = one carry 1 Zero + one = one Zero + zero = zero One + one = 0 carry 1 One + one = 0 carry 1

Lets have a go together 0 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 +

Lets have a go together 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 +

Lets have a go together 0 1 1 0 1 1 0 1 0 1 0 0 0 1 0 0 +

Lets have a go together 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 0 +

Overflow errors A CPU with a capacity of 8 bits has a capacity of up to 11111111 in binary. If one more bit was added there would be an overflow error. Example: 8-bit overflow An example of an 8-bit overflow occurs in the binary sum 11111111 + 1 (denary: 255 + 1). The total is a number bigger than 8 digits, and when this happens the CPU drops the overflow digit because the computer cannot store it anywhere, and the computer thinks 255 + 1 = 0. Overflow errors happen when the largest number that a register can hold is exceeded. The number of bits that it can handle is called the word size. Most CPUs use a much bigger word size than 8 bits. Many PCs have a 64-bit CPU. A 64-bit CPU can handle numbers larger than 18 quintillion (18,446,744,073,709,551,615 to be precise).