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
• Ron McLeod
• Junilu Lacar
• Paul Clapham
• Liutauras Vilda
Sheriffs:
• Jeanne Boyarsky
• Rob Spoor
• Bear Bibeault
Saloon Keepers:
• Tim Moores
• Tim Holloway
• Piet Souris
• Carey Brown
• Stephan van Hulst
Bartenders:
• Frits Walraven
• fred rosenberger
• salvin francis

# Octal

Ranch Hand
Posts: 93
• Number of slices to send:
Optional 'thank-you' note:
I wanna know how to convert octal to decimal
and decimal to octal
and I also wanna know how to convert octal to binary and binary to octal
and how to convert hex to decimal and decimal to hex and hex to binary and binary to hex,
Where should I look for it?

Ranch Hand
Posts: 161
• Number of slices to send:
Optional 'thank-you' note:
Hi Gautam,
Just use the search facility on top and type in Octal and press enter and you will find this subject discussed over and over again in this forum.
Good luck
[ May 08, 2002: Message edited by: La Vish ]

Gautam Sewani
Ranch Hand
Posts: 93
• Number of slices to send:
Optional 'thank-you' note:
If we wanna do some bit shifting on an octal number manually,then we'll have to first convert it into a binary no. and then perform the shifting.
if a binary no. is like this:
00000011
then >>2 would mean:
11000000
coz 1 is shifted right,and other 1 is shifted right
IF i m wrong pls correct me
Thanks

Ranch Hand
Posts: 194
• Number of slices to send:
Optional 'thank-you' note:
Hi Gautam,
when you're doing bit shifting, the bits at the end (in the case of right shifting, >> ) are not rotated, as in your example, but simply fall off. Therefore:
0000 0011 >> 2 becomes 0000 0000 (which is zero).
Whether you have an octal, a decimal, a hexadecimal or even a binary number does not matter - internally they are all represented as binary numbers.