Review Questions:
Binary Integer Arithmetic
© 1998 Charles Abzug
Number Representation |
Range of Numbers Represented |
How many zeroes? |
Carry Bit represents Carry-Out from which bit in the Sum Register? |
How do you go about finding the representation of the negative of a number? |
|
Unsigned Numbers |
|
|
|
|
|
Signed-Magnitude |
|
|
|
|
|
Ones'-Complement |
|
|
|
|
|
Two's-Complement |
|
|
|
|
|
Saturation Arithmetic |
|
|
|
|
|
Instructions for the Next Several Problems: Add each of the following pairs of binary numbers five times, following the rules of:
In each case:
4.
UNSIGNED INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
5.
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
6.
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
7.
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
8.
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
|
|
|
|
|
|
|
|
Decimal Values: |
Z bit: |
|
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
N bit: |
|
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
|
C bit: |
|
Sum Register: |
|
|
|
|
|
|
|
|
|
V bit: |
|
Answers to Selected Questions:
Question 1:
Unsigned Number: 0 + 2 + 4 + 8 + 16 + 32 + 0 + 0 + 256 + 512 + 0 + 2,048 = 2,878
Signed-Magnitude: negative sign bit, magnitude 0 + 2 + 4 + 8 + 16 + 32 + 0 + 0 + 256 + 512 + 0, thus representing -830
Ones'-Complement: a negative number, whose complement is : 0100110000012 or 1,217. Thus, the value of the original bit sequence is -1,217.
Two's Complement: a negative number, which when first complemented and then incremented comes out to 0100110000102 or 1,218. Thus, the value of the original bit sequence is -1,218.
Saturation Arithmetic: Same value as for Unsigned Numbers: 2,878.
Since the MSB is zero, this number represents the same value in all of the representation schemes listed: 0 + 0 + 4 + 8 + 0 + 32 + 0 + 128 + 0 + 0 + 1,024 = 1,196
Unsigned Number: 1 + 0 + 4 + 0 + 16 + 32 + 64 + 0 + 256 + 0 + 1,024 + 2,048 = 3,445
Signed-Magnitude: negative sign bit, magnitude 1 + 0 + 4 + 0 + 16 + 32 + 64 + 0 + 256 + 0 + 1,024, thus representing -1,397
Ones' Complement: a negative number, whose complement is 0010100010102 or 740. Thus, the value of the original bit sequence is -650.
Two's Complement: a negative number which when first complemented and then incremented comes out to 0010100010112 or 651. Thus, the value of the original bit sequence is -651.
Saturation Arithmetic: Same value as for Unsigned Numbers: 3,445.
Since the MSB is zero, this number represents the same value in all of the representation schemes listed: 0 + 2 + 0 + 8 + 16 + 32 + 0 + 0 + 256 + 512 + 1,024 = 1,850
Unsigned Number: 0 + 0 + 4 + 8 + 0 + 32 + 0 + 128 + 0 + 512 + 0 + 2,048 = 2,732
Signed-Magnitude: negative sign bit, magnitude 0 + 0 + 4 + 8 + 0 + 32 + 0 + 128 + 0 + 512 + 0, thus representing -684.
Ones' Complement: a negative number, whose complement is 0101010100112 or 1,363. Thus, the value of the original bit sequence is -1,363.
Two's Complement: a negative number which when first complemented and then incremented comes out to 0101010101002 or . Thus, the value of the original bit sequence is -.1,364
Saturation Arithmetic: Same value as for Unsigned Numbers: 2,732.
Unsigned Number: 0 + 2 + 0 + 8 + 16 + 32 + 0 + 0 + 0 + 0 + 1,024 + 2,048 = 3,130
Signed-Magnitude: negative sign bit, magnitude 0 + 2 + 0 + 8 + 16 + 32 + 0 + 0 + 0 + 0 + 1,024, thus representing -1,082.
Ones' Complement: a negative number, whose complement is 0011110001012 or 965. Thus, the value of the original bit sequence is -965.
Two's Complement: a negative number which when first complemented and then incremented comes out to 0011110001102 or 966. Thus, the value of the original bit sequence is -966.
Saturation Arithmetic: Same value as for Unsigned Numbers: 3,130.
Unsigned Number: 0 + 2 + 4 + 8 + 16 + 32 + 64 + 0 + 0 + 512 + 1,024 + 2,048 = 3,710
Signed-Magnitude: negative sign bit, magnitude 0 + 2 + 4 + 8 + 16 + 32 + 64 + 0 + 0 + 512 + 1,024, thus representing -1,662.
Ones' Complement: a negative number, whose complement is 0001100000012 or 385. Thus, the value of the original bit sequence is -385.
Two's Complement: a negative number which when first complemented and then incremented comes out to 0001100000102 or 386. Thus, the value of the original bit sequence is -386.
Saturation Arithmetic: Same value as for Unsigned Numbers: 3,710.
Unsigned Number: 1 + 0 + 4 + 0 + 16 + 0 + 0 + 128 + 256 + 0 + 0 + 2,048 = 2,453
Signed-Magnitude: negative sign bit, magnitude 1 + 0 + 4 + 0 + 16 + 0 + 0 + 128 + 256 + 0 + 0, thus representing -405.
Ones' Complement: a negative number, whose complement is 0110011010102 or 1,642. Thus, the value of the original bit sequence is -1,642.
Two's Complement: a negative number which when first complemented and then incremented comes out to 0110011010112 or 1,643. Thus, the value of the original bit sequence is -1,643.
Saturation Arithmetic: Same value as for Unsigned Numbers: 2,453.
Since the MSB is zero, this number represents the same value in all of the representation schemes listed: 0 + 2 + 0 + 8 + 16 + 0 + 0 + 128 + 0 512 = 666
Unsigned Number: 0 + 0 + 4 + 8 + 0 + 0 + 64 + 128 + 0 + 0 + 0 + 2,048 = 2,252
Signed-Magnitude: negative sign bit, magnitude = 0 + 0 + 4 + 8 + 0 + 0 + 64 + 128 + 0 + 0 + 0, thus representing -204.
Ones' Complement: a negative number, whose complement is 0111001100112 or 1,843. Thus, the value of the original bit sequence is -1,843.
Two's Complement: a negative number which when first complemented and then incremented comes out to 0111001101002 or 1,844. Thus, the value of the original bit sequence is -1,844.
Saturation Arithmetic: Same value as for Unsigned Numbers: 2,252.
Question 4:
UNSIGNED INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+47 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
0 |
Correct sum
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+47 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
0 |
Correct sum
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+47 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
0 |
Correct sum
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+47 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
0 |
Correct sum
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+47 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
0 |
Correct sum
Question 5:
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+111 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
+189 |
V bit: |
0 |
Correct sum
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
X |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+111 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
1 |
Sum Register: |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
+61 |
V bit: |
1 |
Not the correct sum (Overflow)
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+111 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
-66 |
V bit: |
1 |
Not the correct sum (Overflow)
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+111 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
+61 |
V bit: |
1 |
Not the correct sum (Overflow)
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+111 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
+189 |
V bit: |
0 |
Correct sum
Question 6:
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+175 |
N bit: |
0 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+253 |
V bit: |
0 |
Correct sum
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
X |
1 |
1 |
1 |
1 |
1 |
1 |
O |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
-47 |
N bit: |
1 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
0 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
+31 |
V bit: |
0 |
Correct sum
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
-80 |
N bit: |
1 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
-2 |
V bit: |
0 |
Correct sum
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
-81 |
N bit: |
1 |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
0 |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
-3 |
V bit: |
0 |
Correct sum
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
X |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+175 |
N bit: |
X |
Addend Register: |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+78 |
C bit: |
X |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+253 |
V bit: |
X |
Correct sum
Question 7:
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+175 |
N bit: |
0 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+206 |
C bit: |
1 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
1 |
Not the correct sum (Overflow)
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
X |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
-47 |
N bit: |
1 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
-78 |
C bit: |
0 |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
-125 |
V bit: |
0 |
Correct sum
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
-80 |
N bit: |
0 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
-49 |
C bit: |
1 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
1 |
Not the correct sum (Overflow)
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
-81 |
N bit: |
0 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
-50 |
C bit: |
1 |
Sum Register: |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
+125 |
V bit: |
1 |
Not the correct sum (Overflow)
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
X |
Augend Register: |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
+175 |
N bit: |
X |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+206 |
C bit: |
X |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
+255 |
V bit: |
X |
Correct sum, in accordance with the rules of Saturation Arithmetic!
Question 8:
UNSIGNED NUMBERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+239 |
N bit: |
0 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+206 |
C bit: |
1 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
+189 |
V bit: |
1 |
Not the correct sum
SIGNED-MAGNITUDE INTEGERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
-111 |
N bit: |
1 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
-78 |
C bit: |
1 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
-61 |
V bit: |
1 |
Not the correct sum
ONES'-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
-16 |
N bit: |
1 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
-49 |
C bit: |
1 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
-66 |
V bit: |
0 |
An additional operation (End-Around Carry) needs to be performed before the value in the sum register becomes equal to the true sum of the numbers (Ones'-Complement arithmetic).
TWO'S-COMPLEMENT INTEGERS |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
0 |
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
-17 |
N bit: |
1 |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
-50 |
C bit: |
1 |
Sum Register: |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
-67 |
V bit: |
0 |
Correct sum
SATURATION ARITHMETIC |
|||||||||||
Carry/Borrow Bits: |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
Decimal Values: |
Z bit: |
X |
Augend Register: |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
+239 |
N bit: |
X |
Addend Register: |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
+206 |
C bit: |
X |
Sum Register: |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
+255 |
V bit: |
X |
Correct sum, in accordance with the rules of Saturation Arithmetic!
Last revised 03 Jan 2000