-1
$\begingroup$

How do I convert a negative decimal number into other systems(binary, octal)?

I got the decimal numbers: -22,5 , -60 and 166.

I have to convert them to binary(16 bit) and octal(by hand). I know the system for decimal numbers that are not negative and without decimal point.

$\endgroup$
  • $\begingroup$ Yes, in germany we use a comma instead a decimal point, sorry! $\endgroup$ – FastBatteryCharger Feb 9 '16 at 19:10
  • 2
    $\begingroup$ Are we allowed to use a positive/negative sign (in which case it's trivial), or are you assuming representation in two's complement? $\endgroup$ – DylanSp Feb 9 '16 at 19:13
0
$\begingroup$

Martin, I believe that you need to use a floating point convention to represent the decimal number. You can refer to the article https://en.wikipedia.org/wiki/IEEE_floating_point which shows a number of formats. I don't understand the significance of representing the value in octal verses binary because the base you choose to represent the value is independent from the data structure dictated by the particular format you choose to represent the numeric value. I know you must translate this response to German so I hope the idea I offer is clear. Cheers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.