A. Find the 16-bit 2\'s complementary binary representation for the decimal bumb
ID: 3527495 • Letter: A
Question
A. Find the 16-bit 2's complementary binary representation for the decimal bumber 1987 B. Find the 16-bit 2's complementary binary representation for the decimal bumber -1987Explanation / Answer
1987 = 1024 + 512 + 256 + 128 + 64 + 2 + 1 1987 = 2^10 + 2^9 + 2^8 + 2^7 + 2^6 + 2^1 + 2^0 1987 base ten = 0000 0111 1100 0011 base two -1987 is the two's complement of 1987. To find the two's complement of a binary number, you first invert all of the digits (i.e. 1 becomes 0, and 0 becomes 1), and then add one to the result. 0000 0111 1100 0011 inverted is 1111 1000 0011 1100. Adding one to this yields: -1987 base ten = 1111 1000 0011 1101 (two's complement binary) -------------------------------- To find -1987 in hex, first 1987 (hex) must be found. 1987 = 1792 + 192 + 3 1987 = 7*16^2 + 12*16^0 + 3*16^0 1987 base ten = 0007C3 hex To find the 16's complement of a hex number, first you take the 15's complement by subtracting each digit from 'F', then add 1. 0 -> F - 0 = F 0 -> F - 0 = F 0 -> F - 0 = F 7 -> F - 7 = 8 C -> F - C = 3 3 -> F - 3 = C Adding one to this yields: -1987 base ten = FFF83D (16's complement hex) ---------------------------------- To find -19575 in two's complement binary, first 19575 (binary) must be found. 19575 = 16384 + 2048 + 1024 + 64 + 32 + 16 + 4 + 2 + 1 19575 = 2^14 + 2^11 + 2^10 + 2^6 + 2^5 + 2^4 + 2^2 + 2^1 + 2^0 19575 base ten =(NNN) NNN-NNNN0111 0111 base two To find the two's complement of a binary number, you first invert all of the digits (i.e. 1 becomes 0, and 0 becomes 1), and then add one to the result. (NNN) NNN-NNNN0111 0111 inverted is(NNN) NNN-NNNN1000 1000 Adding one to this yields:(NNN) NNN-NNNN1000 1001 (two's complement) It can be seen that in this conversion, the sign bit was lost due to overflow, since 15 bit two's complement has a range from -(2^13) to 2^13-1, or in decimal, -8192 to 8192. Therefore, the computer thinks that it has the binary number: 0011 0011 1000 1001, or in decimal: 2^13 + 2^12 + 2^9 + 2^8 + 2^7 + 2^3 + 2^0 8192 + 4096 + 512 + 256 + 128 + 8 + 1 13193 (decimal) ----------------------------------- For the following problems, the first step is to pad the number with leading zero's to convert it into a 16 bit number. Next to find the one's complement, all the bits must be inverted. Last, to find the two's complement, 1 must be added to the two's copmlement. a) 10000 10000 -> 0000 0000 0001 0000 one's complement -> 1111 1111 1110 1111 two's complement -> 1111 1111 1111 0000 b) 100111100001001 100111100001001 -> 0100 1111 0000 1001 one's complement -> 1011 0000 1111 0110 two's complement -> 1011 0000 1111 0111 c) 0100111000100100 0100111000100100 -> 0100 1110 0010 0100 one's complement -> 1011 0001 1101 1011 two's complement -> 1011 0001 1101 1100
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.