I understood the out put produced at line 1-----172 I am unable to undertand the output produced at line 2 (out put: 376) and at line 3 (out put: fe ). If any one have idea please hlep me to understand this... Thanks in advance.. Ishmayel

The first one 0254 is an octal representation and hence it is converted to decimal An Octal Representation is possible by prefixing a zero before the number.

We get , a = 172 as an octal gets converted to decimal

In the line 2

Decimal gets converted to octal

In the line 3

Decimal gets converted to hexa decimal

Explanation for line 2 : base 10 is decimal representation 254 (base 10) = x (base 8)

Have to find x

which is 8 L 254 8 L 31 - 6 8 L 3 - 7 0 - 3

When we look after the reminder , we get 376 which is the output

Similarily for line 3,

254 (base 10) = x (base 16)

Have to find x

which is 16 L 254 16 L 15 - 14 0 - 15

Hexadecimal Representations:

Decimal | Hexadecimal 0 - 9 | 0 - 9 10 | a 11 | b 12 | c 13 | d 14 | e 15 | f 16 | 10

Hence the reminder s are 15 and 14 ie. f and e Hence, fe.

Regards,<br />Pradeep Balasubramanian<br /> <br />You have to grow from the inside out. None can teach you, none can make you spiritual. There is no other teacher but your own soul. <br /> <br />- Swami Vivekananda