Mostrar descomposición

DM

UM

C

D

U

Otros sistemas de numeración

Base:

Mostrar la descomposición del número

Otros sistemas de numeración

base1 = 7.4 (slider from 2 to 16, step 1)
num1 = 158.4 (slider from 1 to 1000, step 1)
C10 = 1 (slider from 0 to 9, step 1)
C20 = 1 (slider from 0 to 9, step 1)
C30 = 1 (slider from 0 to 9, step 1)
C40 = 1 (slider from 0 to 9, step 1)
C50 = 1 (slider from 0 to 9, step 1)
c2: round(C20)
c3: round(C30)
c4: round(C40)
c5: round(C50)
c1: round(C10)
L011: {c1, c2, c3, c4, c5}
texto1: "" + c5 + " DM = " + c5 + "x10.000 = " + (If[c5 ≟ 0.0, 0.0, c5 * 10000.0]) + "
" + c4 + " UM = " + c4 + "x1.000 = " + (If[c4 ≟ 0.0, 0.0, c4 * 1000.0]) + "
   " + c3 + " C = " + c3 + "x100 = " + (If[c3 ≟ 0.0, 0.0, c3 * 100.0]) + "
   " + c2 + " D = " + c2 + "x10 = " + (If[c2 ≟ 0.0, 0.0, c2 * 10.0]) + "
   " + c1 + " U = " + c1
texto2: "" + c5 + c4 + c3 + c2 + c1 + " = " + (c5 * 10000.0) + " + " + (c4 * 1000.0) + " + " + (c3 * 100.0) + " + " + (c2 * 10.0) + " + " + c1
desc = false
lista1 = Sequence(Sequence[Translate[cuenta, Vector[(13.7 - 1.1 * t, s - 4.05)]], s, 1.0, Element[L011, t]], t, 1.0, 7.0)
L012 = Sequence(Segment[(4.3 + 1.1 * t, -(3.3)), (4.3 + 1.1 * t, -(3.5) + 9.5)], t, 1.0, 5.0)
b1 = Segment((4.2, -3.3), (11.2, -3.3))
otrabase = false
base: round(base1)
num: round(num1)
digitos: {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
letras: {"A", "B", "C", "D", "E", "F"}
d1 = Mod(num, base)
d10 = Mod(Div[Div[Div[Div[Div[Div[Div[Div[Div[num, base], base], base], base], base], base], base], base], base], base)
d2 = Mod(Div[num, base], base)
d3 = Mod(Div[Div[num, base], base], base)
d4 = Mod(Div[Div[Div[num, base], base], base], base)
d6 = Mod(Div[Div[Div[Div[Div[num, base], base], base], base], base], base)
d5 = Mod(Div[Div[Div[Div[num, base], base], base], base], base)
d7 = Mod(Div[Div[Div[Div[Div[Div[num, base], base], base], base], base], base], base)
d8 = Mod(Div[Div[Div[Div[Div[Div[Div[num, base], base], base], base], base], base], base], base)
d9 = Mod(Div[Div[Div[Div[Div[Div[Div[Div[num, base], base], base], base], base], base], base], base], base)
a = Segment((3.5, -3.6), (14.5, -3.6))
L02 = Sequence(Segment[(2.9 + 1.1 * t, -(3.6)), (2.9 + 1.1 * t, -(3.5) + Min[base, 10.0] - 0.5)], t, 1.0, 10.0)
L1 = 0
L01: {d1, d2, d3, d4, d5, d6, d7, d8, d9, d10}
lista2 = Sequence(Sequence[Translate[cuentap, Vector[(14.0 - 1.1 * t, 0.6 * s - 7.4)]], s, 1.0, Element[L01, t]], t, 1.0, 10.0)
A = (-2.22, -0.7000000000000001)
B = (-2.22, -2.5)
nu: num
c05: floor(nu / 10000.0)
c04: floor(nu / 1000.0) - 10.0 * c05
c03: floor(nu / 100.0) - 10.0 * c04 - 100.0 * c05
c02: floor(nu / 10.0) - 10.0 * c03 - 100.0 * c04 - 1000.0 * c05
c01: nu - 10.0 * c02 - 100.0 * c03 - 1000.0 * c04 - 10000.0 * c05
texto50: "" + (Element[digitos, d1 + 1.0])
texto70: "" + (Element[digitos, d2 + 1.0])
texto60: "" + (Element[digitos, d3 + 1.0])
texto10: d4 + ""
texto11: d5 + ""
texto12: d6 + ""
texto13: d7 + ""
texto14: d8 + ""
texto15: d9 + ""
texto16: d10 + ""
dmillar: floor(c5) + ""
umillar: floor(c4) + ""
centena: floor(c3) + ""
decena: floor(c2) + ""
unidad: floor(c1) + ""
textonum: "" + (floor(c04)) + (floor(c03)) + (floor(c02)) + (floor(c01))
texto003: "" + (floor(d10)) + (floor(d9)) + (floor(d8)) + (floor(d7)) + (floor(d6)) + (floor(d5)) + (floor(d4)) + (Element[digitos, d3 + 1.0]) + (Element[digitos, d2 + 1.0]) + (Element[digitos, d1 + 1.0])
texto9: floor(base) + ""