Unformatted text preview: mbers
0101 + 0010 =
1 0110 2 0111 3 1001 4 1010 Add the Binary Numbers Add the Binary Numbers
0101 + 0010 =
1 0110 2 0111 3 1001 4 1010 Add the Binary Numbers Add the Binary Numbers
0101 + 0101 =
1 0110 2 0111 3 1001 4 1010 Add the Binary Numbers Add the Binary Numbers
0101 + 0101 =
1 0110 2 0111 3 1001 4 1010 News Flash! Choose your own topics! Use those laptops List and vote: 1. 2. 3. Overflow in Binary Addition Overflow in Binary Addition Typically we are limited to representing a number by a certain number of binary digits. Let’s say we are using 4 bits and want to add 1110 and 0010 The answer is 10000, but we only have 4 bits so the extra 1 is lost and we reset to 0000 This is like the odometer on your car. Such overflow can lead to funny unexpected results. Subtracting Binary Numbers Subtracting Binary Numbers 0 1 1 0 0 0 0 1 1 0 0 Again we subtract column by column Subtracting Binary Numbers Subtracting Binary Numbers 0 0 1 1 10 0 0 0 1 1 0 0 But we may have to carry like we would in decimal subtraction. Subtracting Binary Numbers Subtracting Binary Numbers 0 0 1 1 2 0 0 0 1 1 0 0 But we may have to carry much as we would in decimal subtraction. Subtracting Binary Numbers Subtracting Binary Numbers 0 0 1 1 2 0 0 0 1 1 0 1 0 But we may have to carry much as we would in decimal subtraction. Subtracting Binary Numbers Subtracting Binary Numbers 0 2 0 1 1 2 0 0 0 1 1 0 1 1 0 But we may have to carry much as we would in decimal subtraction. Subtracting Binary Numbers Subtracting Binary Numbers 0 2 0 1 1 2 0 0 0 1 1 0 0 0 1 1 0 But we may have to carry much as we would in decimal subtraction. Subtract the Binary Numbers Subtract the Binary Numbers
0101 – 0010 =
1 0010 2 0011 3 0110 4 1001 Subtract the Binary Numbers Subtract the Binary Numbers
0101 – 0010 = 02 0101 0010 0011
1 0010 2 0011 3 0110 4 1001 Subtract the...
View
Full Document
 Fall '07
 JeffRingenberg
 Volt, Binary numbers, Power of two

Click to edit the document details