Can you tell me the funda behind this conversion ? I see from the book that Octal is prefixed with O & Hex is prefixed with OX, Suppose if we take the same example as in RHE for 28, How do we get this Hex conversion 0x1C & octal of 034 ? Thanks, Hema
Here is how i do it: first convert any int to binary then if it is hex you need then every four binary digits summed represent one hex digit Ex. int 28 bin 11100 for hex break bin into quads 0001 : 1100 this gives 0x001C for oct break bin into trips 011 : 100 this gives 034 hope this helps