0

Is there any desktop app for ubuntu that do floating point conversion to binary? I've tried gnome calculator and I can't find the feature even in programming mode. The closest I've found is this page. But it's online and web-based.

2 Answers 2

1

The dc (desk-calculator) command allows specifying both input and output bases:

$ echo  2 o  3.14159  p  |  dc
11.00100100001111110

Or:

$ dc
2 o
3.14159
p
11.00100100001111110
q
  • "2 o" says the output base is 2.
  • "3.14159" stacks the number.
  • "p" prints the value of the top of the stack.

It isn't quite GUI, but unless there is some essential reason for requiring GUI should be close enough.

0

The linux app "galculator" converts floating point to binary. I use it on opensuse and it works on mate, kde, gnome desktop.

It was installed from the opensuse repos through software management.

Open galculator. Go to view in menu. Click on scientific mode. Click on Calculator. Select Number Bases. Select binary.

I assume galculator is available in ubuntu software repos.

tom kosvic

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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