Jump to content

Roman numerals conversion.

mrchow19910319

I dont want to ask anything code related, but I just want to ask about the logic behind the conversion.

I looked it up online and they said there is a rule of subtraction.

1 2 3 4 5
translate to roman numeric is: 
I II III IV V

and noticed that 4 is IV which is literally V minus I.
So we put the bigger number at second and the smaller number up front.
Then we do subtraction.

So I have a question then… when do we need to apply this rule of subtraction then??
Let’s say, I have a number 98, I can see it as : 100-10+8 or I can see it as 40+50+8.
So when do I know I need to use the 1st method and vise versa, when do I know to use the second method?
(and the second method is wrong btw…)

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

The rule of subtraction only applies when there is one lower order symbol before a higher order symbol. Normally the order of symbols is from greater to lesser. If the order is inverted, you apply subtractions. IV is 4, VI is 6. There are more specific rules though if you want to write in roman numerals (for example, you can't write IIV to mean 3).

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Sauron said:

The rule of subtraction only applies when there is one lower order symbol before a higher order symbol. Normally the order of symbols is from greater to lesser. If the order is inverted, you apply subtractions. IV is 4, VI is 6. There are more specific rules though if you want to write in roman numerals (for example, you can't write IIV to mean 3).

 

1 minute ago, valdyrgramr said:

XCVIII 

If you want the whole math bit, since I just woke up have this.

http://www.answers.com/Q/What_is_98_in_roman_numerals

thanks for the reply I will take a look at it later. 

one completely different question: how do I check the build number of my windows 10 system?? 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

I II III IV V VI VII VIII IX X

 

When less than a multiple of 5, you can only go minus 1. You always go 3 up. 123, & 678 but 4 and 9 go down. 

 

Just watching the Star Wars movies :P 

 

i think the Wikipedia page has some good information on it too. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, fpo said:

I II III IV V VI VII VIII IX X

 

When less than a multiple of 5, you can only go minus 1. You always go 3 up. 123, & 678 but 4 and 9 go down. 

 

Just watching the Star Wars movies :P 

 

i think the Wikipedia page has some good information on it too. 

to put this question in another way:

to convert number 98, we need to use subtraction:
98 =90+8=-10+100+5+1+1+1
=> XCVIII

but when it comes to 88 we need to use addition:
88=50+10+10+10+5+1+1+1
=> LXXXVIII

when do we know we need to use method one or method 2???

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, mrchow19910319 said:

to put this question in another way:

to convert number 98, we need to use subtraction:
98 =90+8=-10+100+5+1+1+1
=> XCVIII

but when it comes to 88 we need to use addition:
88=50+10+10+10+5+1+1+1
=> LXXXVIII

when do we know we need to use method one or method 2???

I think the rule is just "whatever is shorter to write". Roman numerals have a tendency to get really cumbersome to write, very quickly. Any time you can shorten them it's a good idea to do it. Other than that, you can't write more than one symbol to subtract - XXC is not a valid way of writing 80.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×