base-10 to base-12 conversion

151 views
Skip to first unread message

Constantine Vassilev

unread,
Oct 28, 2014, 5:18:58 PM10/28/14
to golan...@googlegroups.com
I have following number representing years in base-10 decimal:
10.5 

the meaning is 10 years and half = 10 years and 6 months.

What I need it when I have the number 10.5 which is in base-10 
to be converted to 10.6 which is in base-12. That way I can get 
the whole part which is 10 representing years and decimal part which
is 6 representing months and print it:  10 years and six months.


Tamás Gulácsi

unread,
Oct 28, 2014, 5:27:05 PM10/28/14
to golan...@googlegroups.com
multiply with 12

Constantine Vassilev

unread,
Oct 28, 2014, 5:34:37 PM10/28/14
to golan...@googlegroups.com
and you get what?


On Tuesday, October 28, 2014 2:27:05 PM UTC-7, Tamás Gulácsi wrote:
multiply with 12

Tahir

unread,
Oct 28, 2014, 5:43:51 PM10/28/14
to golan...@googlegroups.com
I guess he meant 10 + 0.5 *12/10 

Constantine Vassilev

unread,
Oct 28, 2014, 5:56:50 PM10/28/14
to golan...@googlegroups.com

I got this table:




10

0

0

10

1

1.2

10

2

2.4

10

3

3.6

10

4

4.8

10

5

6

10

6

7.2

10

7

8.4

10

8

9.6

10

9

10.8



12



According to it 10.5 means 10 years 6 months.
10.6 would mean what? 10 years 7.2 months?

Tahir

unread,
Oct 28, 2014, 6:09:29 PM10/28/14
to golan...@googlegroups.com
Sorry.. I shouldn't have added the `+` inbetween to avoid misunderstanding.

10 years is 10 * 12 months
0.5 year is 0.5 * 12 months hence 6 months.

The same way, 11 years is (10 + 1) years i.e. 10 years and 1 * 12 months. (but you can't write 10.12 obviously)

Tamas meant for you to multiply the decimal part by 12 to find the remainder in months.

Rick

unread,
Oct 28, 2014, 6:20:48 PM10/28/14
to golan...@googlegroups.com
10.5 years is 126 months in base 10. Assuming a notation of A for 10 and B for 11. That would be A6 months in base 12 (10 * 12^1 + 6 * 12^0). What would that be called duodecimal notation? Anyway, that doesn't seem to be what you mean.
Reply all
Reply to author
Forward
0 new messages