473,396 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Decimal to Binary Converter

guys i need a help... i wanna write a java programmee to display the binary number of the entered decimal number.

for ex : in t text area u should type a desimal number and press "Convert" button to display its binary in the next txt field

need help mates,

p.s : should use only 1 statement; stack
Jul 3 '07 #1
4 2390
r035198x
13,262 8TB
...

p.s : should use only 1 statement; stack
What do you mean by that p.s?
Jul 3 '07 #2
JosAH
11,448 Expert 8TB
guys i need a help... i wanna write a java programmee to display the binary number of the entered decimal number.

for ex : in t text area u should type a desimal number and press "Convert" button to display its binary in the next txt field

need help mates,

p.s : should use only 1 statement; stack
If you're dealing with Strings and Integers check out the API documentation for
those classes: String and Integer. In your case most if not all of the work has
been done already and implemented by methods in the Integer class. Convert
an input string (representing a decimal notation of a number) to an Integer and
convert it back again to a string binary representation of that same number.

kind regards,

Jos

ps. I don't understand your ps either.
Jul 3 '07 #3
prometheuzz
197 Expert 100+
!@OP:
Don't bother with this doofus. S/he posted this exact same "question" in the folloing Usenet groups without bothering to reply to a single one of them:
mailing.freebsd.java
comp.lang.java.advocacy
comp.lang.java.help
comp.lang.java.programmer

Jul 3 '07 #4
JosAH
11,448 Expert 8TB
!@OP:
Don't bother with this doofus. S/he posted this exact same "question" in the folloing Usenet groups without bothering to reply to a single one of them:
mailing.freebsd.java
comp.lang.java.advocacy
comp.lang.java.help
comp.lang.java.programmer

I guess s/he got spoonfed somewhere then. no reading, no understanding, just
copy and paste; that's what knowledge is all about in this century ;-)

kind regards,

Jos
Jul 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
2
by: Steve Summit | last post by:
-----BEGIN PGP SIGNED MESSAGE----- It's often explained that the reason for some of the imprecision in C's definition is so that C can be implemented on different kinds of machines -- say, those...
1
by: lmh86 | last post by:
Should the following algorithm produce the binary equivalent of an inputed decimal value? ---------- cout << "Decimal value: "; cin >> Decimal; Binary = 0; Remainder = Decimal; for(Power =...
3
by: Brian Henry | last post by:
Does anyone know of or know how to convert a COBOL packed decimal in a text file to a decimal that .NET can work with? we are importing Old COBOL data files that have packed data in them and need...
28
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?...
1
by: girl23 | last post by:
Hi there ]i am new to C programming and totally lost. iam trying to convert decimal to binary. here is what i did please ignore the case h and m. I am trying to get case 'b' to work. i do not...
2
by: yinka90 | last post by:
Hi. I have a problem with my converter. It works fine. the only problem is that it doesnt convert single digit numbers properly. public class Main { /** * @param args the command line...
1
by: mturner64 | last post by:
Need decimal to binary converter that does #'s like 0.234, etc. Anyone have any links to any? Thanks, Mike
0
Frinavale
by: Frinavale | last post by:
Convert a Hex number into a decimal number and a decimal number to Hex number This is a very simple script that converts decimal numbers into hex values and hex values into decimal numbers. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.