100 likes | 109 Views
Learn about binary addition and arithmetic using IEEE 754 and 1's complement representations. Understand the concept of carry propagation and explore examples of overflow in adding and subtracting numbers. Improve your understanding of binary computations.
E N D
Exercise: Add these two single precision IEEE 754 numbers: 1 1000 0011 1010…0 1 1000 0001 0110…0 Left number: 1.101x24 Right number: 1.011x 22= 0.01011x24 Add mantissa: 1.101 + 0.01011 = 1.11111x24 The sum is: 1 1000 0011 111110…0
Carry Propagation • 2’s complement best • 1’s complement twice as long • Significant delay reduction using Carry Look Ahead concept
Carry out Consider Binary Addition Assume 5 bits 2’s complement arithmetic
Carry out Consider Binary Addition Assume 5 bits 1’s complement arithmetic 12 - 7 = 12 + (-7) = 5
Carry out Consider Binary Addition Assume 5 bits 1’s complement arithmetic 12 - 13 = 12 + (-13) = -1
Carry out Consider Binary Addition Assume 5 bits 1’s complement arithmetic 10 – 3 = 10 + (-3) = 7
Carry out Consider Binary Addition Assume 5 bits 1’s complement arithmetic
4 Bit 1’s Complement Adder Note: carry ripple doubles Using 1’s complement representation in arithmetic operations is slow!
Quiz 3 • Assume we use 4-bit 2’s complement representation to add two integers, give examples where the sum of two numbers results an overflow: • Adding two positives • Adding two negatives • Subtracting a positive from a negative