Final answer:
To represent the numbers +512 and -29 in binary sign/magnitude and twos complement using 16 bits, for +512 it is 0000 0000 0010 0000 for both representations, and for -29 it is 1000 0000 0001 1101 in sign/magnitude and 1111111111100010 in twos complement.
Step-by-step explanation:
To represent the decimal numbers +512 and -29 in binary sign/magnitude and twos complement using 16 bits, follow these steps:
Sign/Magnitude Representation
+512 in binary is 10 0000 0000 (9 zeros) without the sign bit. Including the sign bit (0 for positive) in 16 bits, it is 0000 0000 0010 0000.
-29 in binary is 11101 without the sign bit. Including the sign bit (1 for negative) in 16 bits, it is 1000 0000 0001 1101.
Twos Complement Representation
+512 is the same as its sign/magnitude because it is positive. So it is 0000 0000 0010 0000.
For -29, we find the binary of 29, which is 11101, complement all the bits (flip 1s to 0s and 0s to 1s), and then add 1. So, the complement is 1110 0000 0001 1101, add 1 gives 1110 0000 0001 1110 which is the twos complement representation, 1111111111100010.