## Answers to Selected Problems on Binary Systems

(See Chapter 1 of Mano's Digital Design (2nd ed.))

1-16 Perform subtraction with the following unsigned decimal numbers by taking the 10's complement of the subtrahend.

(a) 5250 - 1321 = 3929

5250 + 8679 = 13929 (here 8679 is the 10's complement of 1321).

(b) 1753 - 8640 = -6887

1753 + 1360 = 3113

There is no carry. The 10's complement of 3113 is 6887. Thus the answer is -6887

1-18 Perform the arithmetic operations (+42) + (-13) and (-42) - (-13) in binary using the signed-2's-complement representation for negative numbers.

(+42)10 + (-13)10 = (101010)2 + (-1101)2 = (101010)2 + (110011)2 = (1011101)2 = (11101)2 = (29)10

(-42)10 - (-13)10 = -42 + (-(-13)) = -42 + 13 = (-101010)2 + (1101)2 = (-101010)2 + (1101)2= (010110)2 + (001101)2 = (100011)2 There is no carry. Thus the answer is (-11101)2 = (-29)10.

1-25 Assign a binry code in some orderly manner to the 52 playing cards. Use the minimum number of bits.

Hint: Use a six-bit code. Use the first two bits to encode the suits, and the rest to encode different cards in each suit. For instance, use 00, 01, 10, 11, to represent spate, heart, diamond, and club; use 0001, 0010, 0011, ..., 1011, 1100, 1101 to represent Ace, 2, 3, ..., Jack, Queen, and King, respectively, in each suit.

1-26 List the ten BCD digits with an even parity in the leftmost position. (Total of five bits per digit.) Repeat with an odd-parity bit.

Even parity: 00000 10001 10010 00011 10100 00101 00110 10111 11000 01001

Odd parity: 10000 00001 00010 10011 00100 10101 10110 00111 01000 11001

1-27 Write your full name in ASCII using an eight-bit code with the left-most bit always 0. Include a space between names and a period after a middle initial.

John F. Kennedy 01001010 01101111 01101000 01101110 00100000 01000110 00101110 01001011 01100101 01101110 01101110 01100101 01100100 01111001

COSC 3410 Answers to Selected Problems in Mano's Digital Design, Chapter | 1 | 2 | 3 | 4 | 5 | 6 | 7 |