Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Binary, Octal, Hexadecimal Conversions

 
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To help answer some of the questions concerning binary, octal, and hex conversions I added two new pages to my mock exam. The first of the two provides links to resources such as the relevant sections of the Java Language Specification and the Java API Specification.
The second of the two new pages provides a very short tutorial on binary, octal, and hex conversions. Please the new
Java Fundamentals Tutorials pages. Click on the Base Conversions link to see the second new page.
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just added another tutorial. This one is a detailed explanation of a question concerning the hexadecimal representations of Byte.MAX_VALUE, Short.MAX_VALUE, and Char.MAX_VALUE.
MAX_VALUE Tutorial
 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Man you are the quickest draw this side of the ranch
Keep up the good work
Ashish H.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dan,
The MAX_VALUE tutorial was excellent. Can you provide some examples of MIN_VALUE?
For eg what would be the bit representation for
-128 the min value for a byte?
My problem is this - I don't know the bit pattern for say, the min value of long or int. Would it be all 1's? Once I have a bit pattern, I know how to convert between different bases.
Thanks!
Sharda
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The minimum (most negative) value for any integer type has the leftmost bit 1, and all other bits 0.
A bit pattern of all 1's represents -1. If you don't understand this, think of what happens if you add 1 to that number.
[ August 27, 2002: Message edited by: Ron Newman ]
 
Hold that thought. Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic