I want to add binary numbers which contain decimals, like this: 11.0101+111.101
Asked
Active
Viewed 167 times
-9
-
Where is coma? Do you mean decimal? – SMA Nov 15 '14 at 16:09
-
I mean the "." by saying coma – Halim Nov 15 '14 at 16:11
-
1see this http://stackoverflow.com/questions/23325504/java-convert-floating-point-binary-to-floating-point-decimal – SMA Nov 15 '14 at 16:16
-
Also see this: http://en.wikipedia.org/wiki/Binary_number – Phantômaxx Nov 15 '14 at 16:18
-
Comma is `,`. Decimal is `.` – Infinite Recursion Nov 15 '14 at 16:19
-
thatnks @almasshaikh – Halim Nov 15 '14 at 16:22
1 Answers
1
You want to create a function which will take a String
containing a number in binary format with a floating point and convert it to double
. Then you need to use this function on text from two EditText
s (i presume) and add them together. The result will be a double
.
Code is in here: https://stackoverflow.com/a/23325722/2444099

Community
- 1
- 1

Eugen Pechanec
- 37,669
- 7
- 103
- 124