EXERCISE-03
1) Show the addition of (i) 184 + 576 = 760 in BCD.
(ii) 842 + 537 = 1379 in BCD
show their steps needed to form their sum.
1.17 Add, subtract, and multiply in binary:
(a) 1111 and 1001 (b) 1101001 and 110110 (c) 110010 and 11101
1.18 Subtract in binary. Place a 1 over each column from which it was necessary to borrow.
(a) 10100100 - 01110011 (b) 10010011 - 01011001 (c) 11110011 - 10011110
1.19 Divide in binary:
(a) 11101001 / 101 (b) 110000001 / 1110 (c) 1110010 / 1001
Check your answers by multiplying out in binary and adding the remainder.
1.20 Divide in binary:
(a) 10001101 / 110 (b) 110000011 / 1011 (c) 1110100 / 1010
1.6 Subtract in binary. Place a 1 over each column from which it was necessary to borrow.
(a) 11110100 - 1000111 (b) 1110110 - 111101 (c) 10110010 -.111101
1.7 Add the following numbers in binary using 2’s complement to represent negative numbers. Use a word length of 6 bits (including sign) and indicate if an overflow occurs.
(a) 21 + 11 (b) (-14) + (-32) (c) (-25) + 18 (d) (-12) + 13 (e) (-11) + (-21)
Repeat (a), (c), (d), and (e) using 1’s complement to represent negative numbers.
1.33 Add the following numbers in binary using 2’s complement to represent negative numbers. Use a word length of 6 bits (including sign) and indicate if an overflow occurs.
(a) (-10) + (-11) (b) (-10) + (-6) (c) (-8) + (-11) (d) 11 + 9 (e) (-11) + (-4)
Repeat using 1’s complement to represent negative numbers.
1.34 Because A - B = A + (-B), the subtraction of signed numbers can be accomplished by adding the complement. Subtract each of the following pairs of 5-bit binary numbers by adding the complement of the subtrahend to the minuend. Indicate when an overflow occurs. Assume that negative numbers are represented in 1’s complement. Then repeat using 2’s complement.
(a) 01001 - 11010
(b) 11010 - 11001
(c) 10110 - 01101
(d) 11011 - 00111
(e) 11100 - 10101
1.35 Work Problem 1.34 for the following pairs of numbers:
(a) 11010 - 10100 .
(b) 01011 - 11000 .
(c) 10001 - 01010
(d) 10101 - 1101
1.36 (a) A = 101010 and B = 011101 are 1’s complement numbers.
Perform the following operations and indicate whether overflow occurs.
(i) A + B (ii) A - B
(b) Repeat assuming now the numbers are 2’s complement numbers.
1.37 (a) Assume the integers below are 1’s complement integers. Find the 1’s complement of each number, and give the decimal values of the original number and of its complement.
(i) 0000000 (ii) 1111111 (iii) 00110011 (iv) 1000000
(b) Repeat, assuming the numbers are 2’s complement numbers and finding the 2’s complement of them.
SOLUTIONS:
1) i)
(ii) 842 + 537 = 1379 in BCD