Decimal To Binary - Online Code


The code show how to convert a decimal number to binary form. The program is limited upto 8 bits i.e. a maximum value can be 128. Array Value can be changed to make the code work for more bits

Source Code


public class Decimal2Binary //for positive values...


  public static void main(String[] args) throws IOException


    String binary = "";

    double d[] = new double[8];

... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.

Related Online Codes:


No comment yet. Be the first to post a comment.