conversion of binary number

how to find out binary of a negative number for example -9

Page 1 of 1

2 Replies - 856 Views - Last Post: 06 May 2009 - 05:22 PM Rate Topic: -----

#1 sonirameshr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-November 08

conversion of binary number

Post icon  Posted 05 May 2009 - 11:46 PM

how to find out binary of a negative number for example -9. pls send me its urgent...
bcoz i need this in my project work :)
Is This A Good Question/Topic? 0
  • +

Replies To: conversion of binary number

#2 computerfox  Icon User is offline

  • straight vegetarian kid

Reputation: 50
  • View blog
  • Posts: 3,772
  • Joined: 29-January 09

Re: conversion of binary number

Posted 05 May 2009 - 11:52 PM

that's nice...

public static void yourAnswer(){
while(0=0){
System.out.println("I'm sorry, but we don't do your homework for you...");
System.out.println("This isn't a Burger King drive thru...");
System.out.println("Please the code you need help with...");
System.out.println("Thank you.  Please come again...");
}
}



there be your A+ worth of code mate :wink:
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8346
  • View blog
  • Posts: 31,904
  • Joined: 06-March 08

Re: conversion of binary number

Posted 06 May 2009 - 05:22 PM

View Postsonirameshr, on 5 May, 2009 - 10:46 PM, said:

how to find out binary of a negative number for example -9. pls send me its urgent...
bcoz i need this in my project work :)

int x = -9;

x contains the binary of -9 what else do you need
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1