This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
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?
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 ]
SCJP 1.4, President 60s Club
Joined: Apr 19, 2002
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
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. If in doubt, ask your compiler. [ May 08, 2002: Message edited by: Mag Hoehme ]