1

Could you suggest a good base converter that also does "signed" conversions? Either gbase does not do it, or I can't see how it's done. What I want to do is give the program an integer, say, -100, and I need to know the binary byte representation of it (in the example, 1 byte, first bit set to 1). I could possibly calculate this number by hand, but I got to do 1000s of them, and bigger than a single byte.

  • There's probably something missing in your question: the binary representation of a negative number is just the binary representation of its opposite with a - tacked on at the beginning. Do you mean you want the unsigned representation modulo N? Please clarify your question. – Gilles May 6 '11 at 20:58
3

According to the manpage, gbase has a parameter -s to enter signed numbers.

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.