User Profile

Collapse

Profile Sidebar

Collapse
Cassiano
Cassiano
Last Activity: Jun 28 '07, 12:51 PM
Joined: Jun 27 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Cassiano
    replied to Working with bytes
    in Java
    I know that, but i'd like to know if have a possibility to represent a decimal > 127 in just 1 byte, how I can do that? This is possible ?

    Theoretically: 1 byte have 8 bits, so can be 11011101 for example.
    See more | Go to post

    Leave a comment:


  • Cassiano
    started a topic Working with bytes
    in Java

    Working with bytes

    I need to convert 11011101 to a byte but when I try:
    Code:
    Byte.valueOf("11011101", 2);

    Error:
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: Value out of range. Value:"11011101" Radix:2

    What I have to do to decide this problem?
    How I decide this problem with the band of representation of a byte?
    See more | Go to post
No activity results to display
Show More
Working...