• Post Reply Bookmark Topic Watch Topic
  • New Topic

binay values  RSS feed

 
Arun Prasath
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
code:
-----

byte x;

Here,if i wanna store an equivalent decimal value for binary value of 10011100, then what could be the decimal value ?

i mean , what is the decimal equivalent for 10011100 in x..
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not really an Advanced question (but you've posted it in the Advanced forum anyway...).

Integers in Java are stored in two's complement representation.

The value 10011100 is -100 in decimal.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!