# Presti-digit-ation

In the spirit of lightweight prestidigitation, take a break to enjoy a gimmicky digital magic show.

 .'''''''''.---> _________________________              An ordinary 4-digit decimal
: 3 9 1 8 :--->|                         |             number from the audience,
'.........'--->|        Binarizer        |             3 9 1 8, is placed in a
'--->|_________________________|             not-so-mysterious box.
| | | | | | | | | | | |
.'''''''''''''''''''''''''.             12 equivalent digits emerge in a
: 1 1 1 1 0 1 0 0 1 1 1 0 :             different number system (binary).
'.........................'
| | | | | | | | | | | |               Into another box they go...
_V_V_V_V_V_V_V_V_V_V_V_V_
|                         |----.'''''''.          ...only to reappear
|         Presto!         |----: j k l :             as an equivalent
|_________________________|----'.......'             3-digit number  j k l
/   |   \             in another
/    |    \            number system.
/ ____V____ \
/ |         | \          The middle digit  k
(  | Changeo |  )         becomes an equivalent
\ |_________| /          2-digit number  m n
\    | |    /           in yet another
\   | |   /            number system.
.'''''''''.
: j m n l :            The 4 digits  j m n l
'. . . . .'            together form an
| | | |              amount in yet another
____V_V_V_V____          number system.
|               |
|  Abracadabra  |         Now for the topper,
|_______________|         after a magical moment
|                 in one last box, an
V                 equivalent single
.'''.               decimal digit  x
: x :               is presented to a
'...'               mesmerized audience


The digits 3, 9, 1, 8, j, k, l, m, n and x are all different and none are 0.

Just what do you suppose that mysterious decimal digit x might really be?

Shh, psst...
...it’s not really magic, it’s all done with numbers...
...the original audience number was later spotted in their seat unharmed...
...if this takes more than a few minutes to get solved, I surely will believe in magic.

• How can there be ten different digits if none of them are 0? – somebody Oct 25 '16 at 4:35
• Good catch on an important clue, @somebody. (The digits are numerical nonetheless, not fingers for instance.) – humn Oct 25 '16 at 4:44

Presto!

convert input to hex.
output (jkl) = f4e

Changeo!

convert middle digit of input to roman numerals.
"4" becomes "iv"; output (jmnl) = five