Lecture 8: Binary Multiplication & Division
1Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 322 s Complement Signed Numbers0000 0000 0000 0000 0000 0000 0000 0000two= 0ten0000 0000 0000 0000 0000 0000 0000 0001two= 1111 1111 1111 1111 1111 1111 1111two= 231-11000 0000 0000 0000 0000 0000 0000 0000two= -2311000 0000 0000 0000 0000 0000 0000 0001two= -(231 1) 1000 0000 0000 0000 0000 0000 0000 0010two= -(231 2)...1111 1111 1111 1111 1111 1111 1111 1110two= -21111 1111 1111 1111 1111 1111 1111 1111two= -1Why is this representation favorable?Consider the sum of 1 and -2 .... we get -1Consider the sum of 2 and -1 .... we get +1This format can directly undergo addition without any conversions!Each number represents the quantityx31-231+ x30230+ x29229+ ... + x121+ x0203Alternative Representations The following two (intuitive) representations were discardedbecause they required additional conversion steps beforearithmetic could be performed on the numbers sign-and-magnitude: the most significant bit represents+/- and the remaining bits express the magnitude one s complement: -x is represented by inverting allthe bits of xBoth representations above suffer from two zeroes4Addition and Subtraction Addition is similar to decimal arithmetic For subtraction, simply add the negative number hence,sub
Lecture 8: Binary Multiplication & Division • Today’s topics: Addition/Subtraction Multiplication Division • Reminder: get started early on assignment 3. 2 2’s Complement – Signed Numbers 0000 0000 0000 0000 0000 0000 0000 0000two = 0ten
Download Lecture 8: Binary Multiplication & Division
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document: