












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The topics of binary arithmetic including 2's complement for signed numbers, addition and subtraction, multiplication, division, and alternative representations. It explains the advantages of 2's complement and discusses the discarded sign-and-magnitude and one's complement representations. The document also provides examples and algorithms for binary multiplication and division.
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!
= 0two ten 0000 0000 0000 0000 0000 0000 0000 0001
= 1two ten …0111 1111 1111 1111 1111 1111 1111 1111
(^31) = 2-1two 1000 0000 0000 0000 0000 0000 0000 0000
(^31) = -2two 1000 0000 0000 0000 0000 0000 0000 0001
(^31) = -(2– 1)two 1000 0000 0000 0000 0000 0000 0000 0010
(^31) = -(2– 2)two …1111 1111 1111 1111 1111 1111 1111 1110
= -2two 1111 1111 1111 1111 1111 1111 1111 1111
= -1two Why 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 quantity^31 x-2^ + x^231
30 29 + x^2 + … + x^29
1 02 + x^2 1
At every step,• shift divisor right and compare it with current dividend• if divisor is larger, shift 0 as the next bit of the quotient• if divisor is smaller, subtract to get new dividend and shift 1as the next bit of the quotient
) by 2(0010twoten^
)two Initial values 0 1 2 3 4 5
RemainderDivisor Quot Step Iter