2'S Complement Arithmetic

# 2'S Complement Arithmetic - 2’s Complement Arithmetic...

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 Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the 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 ✔ 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 2’s 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 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.

### Page1 / 19

2'S Complement Arithmetic - 2’s Complement Arithmetic...

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

View Full Document
Ask a homework question - tutors are online