This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 2’s Complement Arithmetic Password_________________ © Copyright 2009 Daniel Tylavsky ✔ Binary Number Addition EX: Add 1110 and 1011. 1 1 1 0 1 0 1 1 1 1 Carry 1 1 1 1 =>14 =>11 =>25=2 4 +2 3 + 1 2’s Complement Arithmetic 1 1 1  1 0 1 1 ✔ Binary Number Subtraction EX: From 1110 subtract 1011. 1 +1 Borrow 1 1 +1 1 => 14 =>11 => 3 2’s Complement Arithmetic 1 1 1  1 1 1 1 1 +1 Borrow 1 1 +1 1 ✔ Binary Number Subtraction ✔ EX: From 1110 subtract 1111. 1 +1 1 => 14 =>15 => 1 We need a way to represent negative numbers in machine readable form (i.e., no ‘+’ or ‘” signs.). Borrow 1 +1 1 2’s Complement Arithmetic ✔ SignMagnitude System – Left most bit is sign bit. • 1=> Number is negative • 0=>Number is positive – Remaining bits are magnitude. ✔ EX: Represent the numbers 15 and 12 using a 6bit SignMagnitude representation. 15 D = 1111 B { Sign =>0 01111 BSM } Magnitude12 D = 1100 B =>1 { Sign 01100 BSM } Magnitude 2’s Complement Arithmetic 3Bit Binary Circle 000 001 011 100 010 101 111 110 Base 10Sign Magnitude Number Equivalence +1 +2 +3123 2’s Complement Arithmetic ✔...
View
Full
Document
This note was uploaded on 10/21/2010 for the course CSE 120 taught by Professor Matar during the Spring '08 term at ASU.
 Spring '08
 MATAR

Click to edit the document details