• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst
  • Peter Rooke
  • Mikalai Zaikin
Bartenders:
  • Himai Minh

octal number

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
octal number can have upto 21 digits. How? I didnt understand....
000 to 377 is the range right? and the maximum digit for integer
is 2137483467, that is 10 digits... then how come octal can have upto
21 digits.

Please do reply for my answer...
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Binary can have 2 digits: zero and one
Octal can have up to 8 digits in each position. (0 - 7)
Decimal can have up to 10 digits in each position. (1 - 9)
Hexadecimal can have up to 16 digits in each position. (0 - F)

The maximum size for an int (in decimal form) is about 2 million. In hexadecimal that would be 7FFFFFFF. However a max long in hexadecimal would be 7FFFFFFFFFFFFFFF.

In other words, an octal number can be created that is infinitely long. However if you're talking about how many octal digits there could possibly be in an int, that's a different question. Can you clarify what you mean by "000 to 377 is the range right?" The range of what?
[ February 09, 2006: Message edited by: Marilyn de Queiroz ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic