2'S Complement Arithmetic

2'S Complement Arithmetic - 2s Complement Arithmetic

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 Sign-Magnitude 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 6-bit Sign-Magnitude representation. 15 D = 1111 B { Sign =>0 01111 BSM } Magnitude-12 D = -1100 B =>1 { Sign 01100 BSM } Magnitude 2s Complement Arithmetic 3-Bit Binary Circle 000 001 011 100 010 101 111 110 Base 10-Sign Magnitude Number Equivalence +1 +2 +3-1-2-3 2s Complement Arithmetic...
View Full Document

Page1 / 19

2'S Complement Arithmetic - 2s Complement Arithmetic

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online