4
Contributors
7
Replies
8
Views
10 Years
Discussion Span
Last Post by Aia
0

I have been wondering the definition...
I mean,
Are both 00123 and 12345 five-digit numbers?

Is a question with a trick?.

Yes, both are five-digit numbers. 00123 has a value of 123 units but is a
five-digit number.

0

Sorry, i DIDN'T MEAN to trick you.

That's just one question...:-|

Oh, don't feel bad :sad: . Sometimes we let our "sense of humor" get the
best part of us.

Cheers.

0

I have been wondering the definition...
I mean, Are both 00123 and 12345 five-digit numbers?

If talking in context of programming languages (C/C++), no. A number with leading 0 denotes an octal number the same way that a leading 0X denotes a hexadecimal number.

So in the end, when expressed in decimal format (base 10, normal numbers), 00123 stands for 83.

[tex]123_8 -> 1 * 8^2 + 2 * 8^1 + 3 * 8^0 = 83_1_0[/tex]

0

If talking in context of programming languages (C/C++), no. A number with leading 0 denotes an octal number the same way that a leading 0X denotes a hexadecimal number.

So in the end, when expressed in decimal format (base 10, normal numbers), 00123 stands for 83.

[tex]123_8 -> 1 * 8^2 + 2 * 8^1 + 3 * 8^0 = 83_1_0[/tex]

And that is correct

No this is a trick question. He's trying to trick us.

See iamthewee, you where correct all along. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.