EENG 0360 Electrical Engineering Department Spring 2016 Tuskegee University SOLUTION OF HOMEWORK # 7 Subtract S from M where S - 126ro and M 45 Problem 1: Solution of ProblemIi Subtracting S from...
EENG 0360 Electrical Engineering Department Spring 2016 Tuskegee University SOLUTION OF HOMEWORK # 7 Subtract S from M where S - 126ro and M 45 Problem 1: Solution of ProblemIi Subtracting S from M means performing the operation-S+M-126-45 However you need to encode the number using 8 bits therefore you need to insert one 0 to the left which results in: S - 1261o-01 Since you need-s, therefore you need to use the 2's complement of 011 Ⅲ i02 which is: 111110 LSB Original Number S 126e to C Add 1 of original number of original number Therefore - S in 2's complement notation over 8 bits is: 10000010 Similarly with M -450 Starting with 451o he binary encoding is: 101101; therefore we need to add TWO zeroes to the left to encode it over 8-bis Thus: 4510-001011012 LSB Carry Out resulting from adding l of ori Complement of original number Add 1 M in 2's Complement
EENG 0360 Electrical Engineering Department Spring 2016 Tuskegee University SOLUTION OF HOMEWORK # 7 Subtract S from M where S - 126ro and M 45 Problem 1: Solution of ProblemIi Subtracting S from M means performing the operation-S+M-126-45 However you need to encode the number using 8 bits therefore you need to insert one 0 to the left which results in: S - 1261o-01 Since you need-s, therefore you need to use the 2's complement of 011 Ⅲ i02 which is: 111110 LSB Original Number S 126e to C Add 1 of original number of original number Therefore - S in 2's complement notation over 8 bits is: 10000010 Similarly with M -450 Starting with 451o he binary encoding is: 101101; therefore we need to add TWO zeroes to the left to encode it over 8-bis Thus: 4510-001011012 LSB Carry Out resulting from adding l of ori Complement of original number Add 1 M in 2's Complement