This preview shows pages 1–7. Sign up to view the full content.
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: 2s 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 2s 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 2s 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 2s 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 2s Complement Arithmetic 3Bit Binary Circle 000 001 011 100 010 101 111 110 Base 10Sign Magnitude Number Equivalence +1 +2 +3123 2s Complement Arithmetic...
View Full
Document
 Spring '08
 MATAR

Click to edit the document details