+ 3
How can i find binary,octal,hex string????
as i do in my program i dont know how d output come so check it my code n den plzzz tell dat how can i find these string??? https://code.sololearn.com/cJMJWNJdTNL3/?ref=app //plzzz answer it i can beleive u all bro do it for me Fata1 Err0r Arun Tomar Gaurav Agrawal Deepak Mittal Mayur Koli Amal Reddy Marella A.Omar
9 Answers
+ 6
Refer to this link to learn how the conversion is done:đ
https://www.sololearn.com/learn/4401/?ref=app
+ 2
Can you rephrase the question? I didn't really understand what you're asking for.
+ 2
Oh, base conversions. It's better to look it up with Google for more details, but basically you do division and modulo, you keep in place modulo result and carry over the division result.
For Hexadecimal:
180/16 = 11 = B (turn 10-15 to A-F)
180%16 = 4
180 in decimal = B4 in hexadecimal
+ 2
Harsh Agrawal
I prefer to use array or concatenation operators .
if you use concatenation operators then you need to convert all your resultant values to string and just add all the results.
for hexadecimal you can make one more thing like a switch for A,B,C,D,E,F.
Always use switch case in these programmes to give a user a menu drive options.
Avoid using Inbuilt functions to improve your skills and performance.
Good Luck
+ 2
i didn't really understand your question Harsh Agrawal ...
But if u want to see binary/hex/octal conversion in java here is my code:
https://code.sololearn.com/cM00Zou3pKxv/?ref=app
+ 1
BlazingMagpie can u give me link where i learn dis conversion
+ 1
Deepak Mittal bro i just want to learn how to find binary no etc
as it is in code i just example to understand my question properly???
+ 1
Phantom Phoenix can u xplain me in ur own words so dat can i understand properly???
0
BlazingMagpie bro i just want to know that how i find binary no,octal no etc
as i also do in my program u can check it der