Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Dear all, 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. Any help would be great. 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.

share|improve this question
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
up vote 3 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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