So the UK starts phone numbers with a 0 generally. International numbers 00 (or plus)
You can't represent a leading zero and because there's 2 for an international code you either rely on the 2 not conflicting. So in the UK's case, the international code is 0044 you would have to rely on no other countries using 044 for domestic numbers.
You could get around that by using the sign bit so +44 is literally a positive integer and a non international prefix is negative?
Then there's the non standard phone numbers, eg emergency services. How do they play with all this. Does 0999 or 0911 work? Does that work internationally?
The biggest issue that I can't see around is that Australia's emergency number is 000. How do you encode that as an integer? How do you differentiate from the old US operator number of 0?
The problem is a leading 0 isn't nothing in a phone number. But it is in an integer on a computer.
So then we're left with the definition of possible. Maybe you can encode all the numbers in your particular region. That's possible. But you can't encode any legal phone number globally.
So the UK starts phone numbers with a 0 generally. International numbers 00 (or plus)
You can't represent a leading zero and because there's 2 for an international code you either rely on the 2 not conflicting. So in the UK's case, the international code is 0044 you would have to rely on no other countries using 044 for domestic numbers.
You could get around that by using the sign bit so +44 is literally a positive integer and a non international prefix is negative?
Then there's the non standard phone numbers, eg emergency services. How do they play with all this. Does 0999 or 0911 work? Does that work internationally?
The biggest issue that I can't see around is that Australia's emergency number is 000. How do you encode that as an integer? How do you differentiate from the old US operator number of 0?
The problem is a leading 0 isn't nothing in a phone number. But it is in an integer on a computer.
So then we're left with the definition of possible. Maybe you can encode all the numbers in your particular region. That's possible. But you can't encode any legal phone number globally.