# Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.

## Presentation on theme: "Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor."— Presentation transcript:

Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor System:

Lab 10: 2’s Complement Conversion : Signed numbers encoded using 2’s complement notation can be added and subtracted using one process: “The process of addition”. Converting numbers to 2’s complement form is easy. Positive Numbers: Example: Convert +22 into 8 bit 2’s complement form. Rule : 2’s complement notation = Binary Notation. 1248163264 Sign Bit Process: Write 22 as a 7 bit number. Make the Sign Bit =0 to denote a positive number and your done! 0010110 0+ 16+0+4+2 +0 = 22 0 Thus +22 = 0 0010110 in 8 bit 2’s complement notation. Negative Numbers: Example: Convert -22 into 8 bit 2’s complement form. Rule : 2’s complement notation is NOT= Binary Notation. You must use a 3 step procedure to convert the negative number. Step 1: Write –22 as an 8 bit positive number From the work above: +22 = 0 0010110 1248163264 Sign Bit 00010110 Step 2: Invert all bits The result of this process is called 1’s complement notation. 11101001 Step 3: Add 1 to this new binary pattern 11101001 + 1 11101010 Thus -22 = 1 1101010 in 8 bit 2’s complement notation. Theory: Adding a positive and a negative 2’s comp. number will subtract the 2 numbers. Test the Theory: Try 22+(-22) 11101010 00010110 + 00000000 -22 +22 1 At first glance it does not appear to work. The 1 in the MSB is actually a carry out and can be ignored! Answer = 0 Slide #3