Computer Systems 1 Fundamentals of Computing Negative Binary.

Slides:



Advertisements
Similar presentations
Intro to CS – Honors I Representing Numbers GEORGIOS PORTOKALIDIS
Advertisements

Representing Numbers: Integers
James Tam Numerical Representations On The Computer: Negative And Rational Numbers How are negative and rational numbers represented on the computer? How.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Representations Example: Numbers –145 –CVL – –91 –
1 Binary Arithmetic, Subtraction The rules for binary arithmetic are: = 0, carry = = 1, carry = = 1, carry = = 0, carry =
Mathematics with Binary. Question  Below is a binary string  Which is the least significant bit (LSB)?  Which is the most significant bit (MSB)? 0.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Complements: different approaches for representing negative numbers
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Signed Numbers CS208. Signed Numbers Until now we've been concentrating on unsigned numbers. In real life we also need to be able represent signed numbers.
Review Binary Basic Conversion Binary Decimal
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.
Introduction to Number Systems
3. Representing Integer Data
Chapter 3 Data Representation part2 Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
Binary Representation and Computer Arithmetic
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
1 Week 3: Data Representation: Negative Numbers READING: Chapter 3.
EEL-3705 TPS QUIZZES. Think - Pair - Share (TPS) Quizzes Think – Pair – Share –Think individually for one time units –Pair with partner for two time units.
Data Representation – Binary Numbers
Chapter 7 Arithmetic Operations and Circuits Binary Arithmetic Addition –When the sum exceeds 1, carry a 1 over to the next-more-significant column.
BINARY ARITHMETIC Binary arithmetic is essential in all digital computers and in many other types of digital systems.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
Computer Architecture
CSE 111 Representing Numeric Data in a Computer Slides adapted from Dr. Kris Schindler.
Calculating Two’s Complement. The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Cosc 2150: Computer Organization Chapter 2 Part 1 Integers addition 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.
Positional Number Systems
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Number Systems and Logic Prepared by Dr P Marais (Modified by D Burford)
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
1 Review on Number Systems Decimal, Binary, and Hexadecimal.
07/12/ Data Representation Two’s Complement & Binary Arithmetic.
Two’s Complement. A system used to represent a negative number in binary A system used to represent a negative number in binary Positive numbers start.
Addition and Substraction
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
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=
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Monday, January 13 CEC 220 Digital Circuit Design Slide 1 of 14.
1 Number Systems Decimal, Binary, and Hexadecimal.
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Fri, Aug 28 CEC 220 Digital Circuit Design Slide 1 of 14.
IT1004: Data Representation and Organization Negative number representation.
In decimal we are quite familiar with placing a “-” sign in front of a number to denote that it is negative The same is true for binary numbers a computer.
09/03/20161 Information Representation Two’s Complement & Binary Arithmetic.
Computer Organization 1 Data Representation Negative Integers.
ECE 3110: Introduction to Digital Systems Signed Number Conversions and operations.
Lecture No. 4 Computer Logic Design. Negative Number Representation 3 Options –Sign-magnitude –One’s Complement –Two’s Complement  used in computers.
Binary Addition The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple, using a form of carrying:
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
Addition and Subtraction
Negative Binary Numbers
Computer Science 210 Computer Organization
Negative Binary Numbers
Binary Addition & Subtraction
TAO1221 COMPUTER ARCHITECTURE AND ORGANIZATION LAB 6
Computer Science 210 Computer Organization
Unit 18: Computational Thinking
ECE 331 – Digital System Design
CSC 220: Computer Organization Signed Number Representation
Chapter3 Fixed Point Representation
Computer Architecture CST 250
Presentation transcript:

Computer Systems 1 Fundamentals of Computing Negative Binary

Computer Systems 1 ( ) Negative Binary How significant are your bits? Binary Addition Rules Sign your name across my CPU Negative Binary  Sign and Magnitude  Two’s Complement

Computer Systems 1 ( ) Significance of Bits In binary there are two key aspects to a binary number:  MSB = Most Significant Bit  LSB = Least Significant Bit The largest binary value is deemed the most important Sometimes known as “Big-Endian” format E.g.- MSB LSB

Computer Systems 1 ( ) Binary Addition Binary addition is a key aspect of working with binary and using negative binary numbers Binary addition rules:  = 0  = 1  = 1  = 10 (0 carry 1)

Computer Systems 1 ( ) Binary Addition E.g (11) (26) (2) (52) = 1101 (13) = (78) Binary addition skills are useful when dealing with binary arithmetic / negative numbers / subtraction

Computer Systems 1 ( ) Negative Binary ‘Normal’ Binary numbers are not indicative of whether the number is positive of negative  Unsigned number Methods of negative number representation in binary have been devised:  Negative binary representation forms Sign and Magnitude Two’s Complement A number which indicates it’s polarity is called a ‘signed number’

Computer Systems 1 ( ) Sign and Magnitude The MSB is an indicator  A sign bit  The MSB is only a sign, it is NOT part of the actual number  The remaining number is the magnitude Binary 0 = positive number Binary 1 = negative number Numbers are padded out as required

Computer Systems 1 ( ) Sign and Magnitude E.g-  = decimal 0  = decimal 1 (note 0 is postitive)  = decimal -1 (note 1 is negative)  = decimal 10  = decimal -10  = decimal 83  = decimal -83

Computer Systems 1 ( ) Two’s Complement Binary Uses an implicit sign bit  The sign bit indicates if the number is positive or negative Binary 0 = positive Binary 1 = negative  If the sign bit is set to 1, then the place value of that bit becomes negative when calculating the value The remaining values must then add to the number until it reaches the desired value  The sign bit contributes to the value of the number (the magnitude)

Computer Systems 1 ( ) Two’s Complement Binary E.g.-  0101 = decimal  1011 = decimal  = decimal  = decimal

Computer Systems 1 ( ) Two’s Complement Binary Converting binary to Two’s complement: Take the original binary number and invert it’s values  E.g (13) Then add 1 to the final value  E.g = (-13) Because =(-13)

Computer Systems 1 ( ) CS1 What you know now:  Significant bits: MSB LSB  Binary addition  Signed and Unsigned bits  Negative binary Sign and Magnitude  Non-inclusion of significant bit Two’s complement  Inclusion of significant bits  Conversion methods