Well... They are registers, so yes. The question is whether it'd make sense to do it and what problem would that solve.
In a past life, I taught young programmers you can, of course, make a phone number a numeric field in your database (and save a couple bytes by doing that!) but it'd only make sense if you wante to figure out the average phone number for all your clients so you could call them all at once.
There are extreme cases where it would actually make sense, but that I usually left to dig into in a later discussion.
I don't know enough about phone numbers to say whether you could encode them as an int anyway. In the UK all standard numbers start 0 and international codes start 00? Of course you could introduce a 'locale' and then 20 years later try to solve that mess with multiple ways of representing international numbers. Or maybe not teach young programmers that you can make the phone number a numeric field?
So it seems to me the solution is to save them as BCD...
In addition to digits, conventions for phone numbers include the plus sign (international prefix), comma (dial pause), dashes or parentheses (zone/area codes), and spaces (logical separation). I don't see why you'd want to burden yourself with having to regenerate a locally-correct phone number representation each time it needs to be displayed to the user.
I think you and and your parent are in agreement, you CAN do something, but it's not useful, and then you have to either by convention or additional fields deal with the leading zeros and other non-numeric aspects of phone numbers.
I would also teach young programmers (about data) with the shorthand used above, things like "Do you want to add phone numbers? Multiply them? Utilize fractional components? Why are we storing these as numbers?"
I'm not sure we are. My parent suggested you could, in the sense of why would you. I'm questioning if it's possible at all. And if so, is that just based on a local solution. Ie all numbers have an implicit 0 at the start.
To me storing as a number to save space is a fine goal itself. The issue is the underlying complexity which a bare int can't capture. Suggesting using an int indicates the proposer hasn't thought about the issue.
This isn't to say the parent was wrong person se. Asking why you are doing something is a good question. But also understanding the issue/complexity is important too.
In the example I would say that saving space is a sufficient reason, so the point is moot. The reason why you wouldn't want to do it is because a phone number is not 'just a number' (I'm sure there's a mathematical term for a number where leading zeros are important etc).
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.
The use of "What could possibly go wrong" as a provocation, to make students explore what actually can go wrong when we provide a terrible idea (or a good one that has a couple terrible aspects hidden inside them)
In a past life, I taught young programmers you can, of course, make a phone number a numeric field in your database (and save a couple bytes by doing that!) but it'd only make sense if you wante to figure out the average phone number for all your clients so you could call them all at once.
There are extreme cases where it would actually make sense, but that I usually left to dig into in a later discussion.