Esperaba que alguien de aquí pudiera ayudar a explicar las conversiones de base de números con puntos Radix. Estoy cursando mi Licenciatura en Ciencias de la Computación con 12 cursos restantes, actualmente en un curso de Hardware de Computación.
Para una de mis tareas, tuve que completar la siguiente tabla (las áreas en gris son los valores que me dieron para convertir a cada uno de los demás):
Aquíhaymásdemitrabajoparalasotrasconversionesquenosemuestrandirectamenteenlatabla:
DecToBin(37)=(37/2=1)(18/2=0)(9/2=1)(4/2=0)(2/2=0)(1/2=1)===101001orinreverseorder100101DecToBin(99)=(99/2=1)(49/2=1)(24/2=0)(12/2=0)(6/2=0)(3/2=1)(1/2=1)===1100011orinreverseorder1100011DecToBin(256)=(598/2=0)(299/2=1)(149/2=1)(74/2=0)(37/2=1)(18/2=0)(9/2=1)(4/2=0)(2/2=0)(1/2=1)===0110101001orinreverseorder1001010110DecToBin(3243)=(3243/2=1)(1621/2=1)(810/2=0)(405/2=1)(202/2=0)(101/2=1)(50/2=0)(25/2=1)(12/2=0)(6/2=0)(3/2=1)(1/2=1)===110101010011orinreverseorder110010101011DecToB7(37)=(37/7)=5r2or52;DecToB7(99)=(99/7)=14r1,(14/7)=2r0;==201;DecToB7(170)=(170/7)=24r2;(24/7)=3r3;==332;DecToB7(1757)=(1757/7)=251r0;(251/7)=35r6;(35/7)=5r0;==5060;DecToB7(598)=(598/7)=95r3;(95/7)=13r4;(13/7)=1r6;DecToB7(3243)=(3243/7)=463r2;(463/7)=66r1;(66/7)=9r3;(9/7)=1r2;==12312;B7toDec(12)=(1*7^1)+(2*7^0)=(7)+(2)=9inDecimalB7toDec(666)=(6*7^2)+(6*7^1)+(6*7^0)=342inDecimalDecToBin(9)=(9/2=1)(4/2=0)(2/2=0)(1/2=1)===1001orinreverseorder1001DecToBin(342)=(342/2=0)(171/2=1)(85/2=1)(42/2=0)(21/2=1)(10/2=0)(5/2=1)(2/2=0)(1/2=1)===011010101orinreverseorder101010110
Ahoramehandadounasegundatablaparahacerlomismo,peroestaeslaquedeboincluirparacalculartodoslosvaloresencuatrolugaresdespuésdelpuntoradix.Milibroensínoesmuyclaro,solomerefieroalospuntosradixenuncapítulode2oraciones,yloqueheencontradoenlíneanomeha"pinchado".
¿Alguienpuedeintentarexplicarcómomeconvertiríaconlospuntosradixcomosedescribe?Noestoybuscandorespuestas,soloparaquealguienmeproporcionealgunosejemplosquemepermitancomprenderquésemepreguntaycómohacerlo.
Cualquierytodalaasistenciaapreciada!Estaclasehasidodifícilhastaahoraytodavíaestoyrecuperándomeenalgunasáreas:)
EDIT:
¿PuedealguienconfirmarsiestoyenelcaminocorrectoyendoaDecimal?
BinaryToDec(11011.0111)=2^4+2^3+0+2^1+2^0.+0+2^-2+2^-3+2^-4=30.4375BinaryToDec(111.0111)=2^2+2^1+2^0.+2^-1+0+2^-3+2^-4=7.6875HexToDec(2.08)=(2*16^0)+.(0)+(8*16^-2)=2.03125HexToDec(AB.C)=(10*16^1)+(11*16^0)+.(12*16^-1)=171.75Base7ToDec(1.2)=(1*7^0).+(2*7^-1)=1.285714286Base7ToDec(66.6)=(6*7^1)+(6*7^0)+.(6*7^-1)=48.85714286
EDIT2:
Haciendoalgunosprogresos:
DecToBin(0.25) = 2^-2 = 0.25 or 0.0100
DecToBin(0.35)=
BinaryToDec(11011.0111) = (2^4)+(2^3)+(0)+(2^1)+(2^0) + (0)+(2^-2)+(2^-3)+(2^-4) = 27.4375
BinaryToDec(111.1011) = (2^2)+(2^1)+(2^0) + (2^-1)+(0)+(2^-3)+(2^-4) = 7.6875
HexToDec(2.08) = (2*16^0) + (0)+(8*16^-2) = 2.03125 or by specs 2.0313
HexToDec(AB.C) = (10*16^1)+(11*16^0) + (12*16^-1) = 171.75 or by specs 171.7500
Base7ToDec(1.2) = (1*7^0)+(2*7-1) = 1.285714286 or by specs 1.2857
Base7ToDec(66.6) = (6*7^1)+(6*7^0) + (6*7^-1) = 48.85714286 or by specs 48.8571
http://cs.furman.edu/digitaldomain/more/ch6/dec_frac_to_bin.htm
DecToBinary(0.25) = 0.25*2 = 0.50 (0.0???); 0.50*2 = 1.00 (0.01??); 00*2 = 0, so answer is 0.0100
DecToBinary(0.35) = 0.35*2 = 0.70 (0.0???); 0.70*2 = 1.4 (0.01??); 0.4*2 = 0.80 (0.010?);
0.80*2 = 1.60 (0.0101????); 0.6*2 = 1.20 (0.01011???); 0.2*2 = 0.4 (0.010110??);
0.4*2 = 0.8 (0.0101100?); 0.8*2 = 1.60 (0.01011001????);
0.60*2 = 1.20 (0.010110011???); 0.2*2 = 0.4 (0.0101100110??);
0.4*2 = 0.8 (0.01011001100?); 0.8*2 = 1.60 (0.010110011001?);
DecToBinary(2.0313) = 2.0313*2 = 4.0626 (1?.????); 0.626*2= 1.252 (10.????);
0.252*2 = 0.504; (10.0???); 0.504*2 = 1.008 (10.01??);
0.008*2 = 0.016 (10.010?); 0.016*2 = 0.032 (10.0100???);
0.032*2 = 0.064 (10.01000??); 0.064*2 = 0.128 (10.010000?);
0.128*2 = 0.256 (10.0100000???); 0.256*2 = 0.512 (10.01000000??);
0.512*2 = 1.024 (10.010000001???); or by specs 10.0100….
EDIT3 :
Más progreso. Aún tengo algunos problemas con las conversiones de Decimal- > Base7:
DecToBin(0.25)=2^-2=0.25or0.0100DecToBin(0.35)=BinaryToDec(11011.0111)=(2^4)+(2^3)+(0)+(2^1)+(2^0)+(0)+(2^-2)+(2^-3)+(2^-4)=27.4375BinaryToDec(111.1011)=(2^2)+(2^1)+(2^0)+(2^-1)+(0)+(2^-3)+(2^-4)=7.6875HexToDec(2.08)=(2*16^0)+(0)+(8*16^-2)=2.03125orbyspecs2.0313HexToDec(AB.C)=(10*16^1)+(11*16^0)+(12*16^-1)=171.75orbyspecs171.7500Base7ToDec(1.2)=(1*7^0)+(2*7-1)=1.285714286orbyspecs1.2857Base7ToDec(66.6)=(6*7^1)+(6*7^0)+(6*7^-1)=48.85714286orbyspecs48.8571http://cs.furman.edu/digitaldomain/more/ch6/dec_frac_to_bin.htmDecToBinary(0.25)=0.25*2=0.50(0.0???);0.50*2=1.00(0.01??);00*2=0,soansweris0.0100DecToBinary(0.35)=0.35*2=0.70(0.0???);0.70*2=1.4(0.01??);0.4*2=0.80(0.010?);0.80*2=1.60(0.0101????);0.6*2=1.20(0.01011???);0.2*2=0.4(0.010110??);0.4*2=0.8(0.0101100?);0.8*2=1.60(0.01011001????);0.60*2=1.20(0.010110011???);0.2*2=0.4(0.0101100110??);0.4*2=0.8(0.01011001100?);0.8*2=1.60(0.010110011001?);DecToBinary(2.0313)=2.0313*2=4.0626(1?.????);0.626*2=1.252(10.????);0.252*2=0.504;(10.0???);0.504*2=1.008(10.01??);0.008*2=0.016(10.010?);0.016*2=0.032(10.0100???);0.032*2=0.064(10.01000??);0.064*2=0.128(10.010000?);0.128*2=0.256(10.0100000???);0.256*2=0.512(10.01000000??);0.512*2=1.024(10.010000001???);orbyspecs10.0100….DecToBinary(171.7500)=(171)=128+0+32+0+8+0+2+1=10101011.0.7500*2=1.500(1.1???);0.500*2=1.000(1.11??)===10101011.1100;DecToBinary(1.2857)=1.2857*2=2.5714(1.????);0.5714*2=1.1428(1.1???);0.1428*2=0.2856(1.10??);0.2856*2=0.5712(1.100?);0.5712*2=1.1424(1.1001);0.1424*2=0.2848(1.10010???);0.2848*2=0.5696(1.100100??);0.5696*2=1.1392(1.1001001??);0.1392*2=0.2784(1.10010010…)orbyspecs1.1001…DecToBinary(48.8571)=(48)=00110000.0.8571*2=1.7142(0.1????);0.7142*2=1.4284(0.11???);0.4284*2=0.8568(0.110??);0.8568*2=1.7136(0.1101?);0.7136*2=1.4272(0.11011)===110000.11011orbyspecs110000.1101DecToHex(0.25)=0.???=0.25*16=4;(0.4??);DecToHex(0.35)=0.???=0.35*16=5.6(0.5??);0.6*16=9.6(0.59???);0.6*16=9.6(0.599???);===0.5999999999…..orbyspecs0.5999DecToHex(27.4375)=(27)=1B;0.4375*16=7;===1B.7DecToHex(7.6875)=(7)=7;0.6875*16=1.375(7.1??);0.375*16=6(7.16);===7.BDecToHex(1.2857)=(1)=1;0.2857*16=0.57141.4923A;DecToHex(48.8571)=48/16=3?.????;0/16=0(30.????);0.8571*16=13.7136(30.D???);0.7136*16=11.4176(30.DB???);0.4175*16=6.6816(30.DB6??);0.6816*16=10.9056(30.DB6A?);0.9056*16=14.4896(30.DB6AE?);0.4896*16=7.8336;DecToBase7(0.25)=0.???=0.25*7=1.75(0.1??);0.75*7=5.25(0.15??);0.25*7=1.75(0.151?);
EDIT4:
Claramente,estoyhaciendoalgomalconmisconversionesdeDecimalaBase7.Finalmenteencontréuna
¿Alguienpuededetectarloqueestoyhaciendomalenmimatemática?
DecToBase7(0.25)=(0*7^0)+(2*7^-1)+(5*7^-2)=(0)+(0.2857142857)+(0.1020408163)=0.387755102orbyspecs0.3877.DecToBase7(0.35)=(0*7^0)+(3*7^-1)+(5*7^-2)=(0)+(0.4285714286)+(0.1020408163)=0.5306122449orbyspecs0.5306.DecToBase7(27.4375)=(2*7^1)+(7*7^0)+(4*7^-1)+(3*7^-2)+(7*7^-3)+(5*7^-4)=21.65514369orbyspecs21.6551.DecToBase7(7.6875)=(7*7^0)+(6*7^-1)+(8*7^-2)+(7*7^-3)+(5*7^-4)=8.042898792orbyspecs8.0428
EDIT5:
¡GraciasatodoslosquemeayudaronacomprendermejorlasconversionesdeDecimal/Binary/Hex/Base7con/sinpuntosRadix!Tengolamesacompletamentellenaycreoqueestácerca,sinotodo,correcto.Loverificarémástarde,peroporahoraaquíestálatablaymiscálculosquesolíallegaralosvalores(consuerteayudaráaalguienmásenelcamino):
DecToBin(0.25) = 2^-2 = 0.25 or 0.0100
DecToBin(0.35)=
BinaryToDec(11011.0111) = (2^4)+(2^3)+(0)+(2^1)+(2^0) + (0)+(2^-2)+(2^-3)+(2^-4) = 27.4375
BinaryToDec(111.1011) = (2^2)+(2^1)+(2^0) + (2^-1)+(0)+(2^-3)+(2^-4) = 7.6875
HexToDec(2.08) = (2*16^0) + (0)+(8*16^-2) = 2.03125 or by specs 2.0313
HexToDec(AB.C) = (10*16^1)+(11*16^0) + (12*16^-1) = 171.75 or by specs 171.7500
Base7ToDec(1.2) = (1*7^0)+(2*7-1) = 1.285714286 or by specs 1.2857
Base7ToDec(66.6) = (6*7^1)+(6*7^0) + (6*7^-1) = 48.85714286 or by specs 48.8571
DecToBinary(0.25) = 0.25*2 = 0.50 (0.0???); 0.50*2 = 1.00 (0.01??); 00*2 = 0, so answer is 0.0100
DecToBinary(0.35) = 0.35*2 = 0.70 (0.0???); 0.70*2 = 1.4 (0.01??); 0.4*2 = 0.80 (0.010?);
0.80*2 = 1.60 (0.0101????); 0.6*2 = 1.20 (0.01011???); 0.2*2 = 0.4 (0.010110??);
0.4*2 = 0.8 (0.0101100?); 0.8*2 = 1.60 (0.01011001????);
0.60*2 = 1.20 (0.010110011???); 0.2*2 = 0.4 (0.0101100110??);
0.4*2 = 0.8 (0.01011001100?); 0.8*2 = 1.60 (0.010110011001?);
DecToBinary(2.0313) = 2.0313*2 = 4.0626 (1?.????); 0.626*2= 1.252 (10.????);
0.252*2 = 0.504; (10.0???); 0.504*2 = 1.008 (10.01??);
0.008*2 = 0.016 (10.010?); 0.016*2 = 0.032 (10.0100???);
0.032*2 = 0.064 (10.01000??); 0.064*2 = 0.128 (10.010000?);
0.128*2 = 0.256 (10.0100000???); 0.256*2 = 0.512 (10.01000000??);
0.512*2 = 1.024 (10.010000001???); or by specs 10.0100….
DecToBinary(171.7500) = (171) = 128+0+32+0+8+0+2+1 = 10101011. 0.7500*2 = 1.500 (1.1???);
0.500*2 = 1.000 (1.11??) === 10101011.1100;
DecToBinary(1.2857) = 1.2857*2 = 2.5714 (1.????); 0.5714*2 = 1.1428 (1.1???); 0.1428*2 = 0.2856 (1.10??); 0.2856*2 = 0.5712 (1.100?); 0.5712*2 = 1.1424 (1.1001); 0.1424*2 = 0.2848 (1.10010???); 0.2848*2 = 0.5696 (1.100100??); 0.5696*2 = 1.1392 (1.1001001??); 0.1392*2 = 0.2784 (1.10010010…) or by specs 1.1001…
DecToBinary(48.8571) = (48) = 00110000. 0.8571*2 = 1.7142 (0.1????); 0.7142*2 = 1.4284 (0.11???); 0.4284*2 = 0.8568 (0.110??); 0.8568*2 = 1.7136 (0.1101?); 0.7136*2 = 1.4272 (0.11011) ===
110000.11011 or by specs 110000.1101
DecToHex(0.25) = 0.??? = 0.25*16 = 4; (0.4??);
DecToHex(0.35) = 0.??? = 0.35*16 = 5.6 (0.5??); 0.6*16 = 9.6 (0.59???); 0.6*16 = 9.6 (0.599???); === 0.5999999999….. or by specs 0.5999
DecToHex(27.4375) = (27) = 1B; 0.4375*16 = 7; === 1B.7
DecToHex(7.6875) = (7) = 7; 0.6875*16 = 1.375 (7.1??); 0.375*16 = 6 (7.16); === 7.B
DecToHex(1.2857) = (1) = 1; 0.2857*16 = 0.5714 1.492
3A;
DecToHex(48.8571) =48/16 = 3?.????; 0/16 = 0 (30.????); 0.8571*16 = 13.7136 (30.D???); 0.7136*16 = 11.4176 (30.DB???); 0.4175*16 = 6.6816 (30.DB6??); 0.6816*16 = 10.9056 (30.DB6A?); 0.9056*16 = 14.4896 (30.DB6AE?); 0.4896*16 = 7.8336;
Para verificar los resultados de Base7: enlace
DecToBase7(0.25) = 0.???? = 0.25*7 = 1.75 (0.1???); 0.75*7 = 5.25 (0.15??); 0.25*7 = 1.75 (0.151?); 0.75*7 = 5.25 (0.1515…);
DecToBase7(0.35) = 0.???? = 0.35*7 = 2.45 (0.2???); 0.45*7 = 3.15 (0.23??); 0.15*7 = 1.05 (0.231?); 0.05*7 = 0.35 (0.2310);
DecToBase7(27.4375) = 36.???? = 0.4375*7 = 3.0625 (36.3???); 0.0625*7 = 0.4375 (36.30??); 0.4375*7 = 3.0625 (36.303?); 0.0625*7 = 0.4375 (36.3030);
DecToBase7(7.6875) = 10.???? = 0.6875*7 = 4.8125 (10.4???); 0.8125*7 = 5.6875 (10.45??); 0.6875*7 = 4.8125 (10.454?); 0.8125*7 = 5.6875 (10.4545);
DecToBase7(2.0313) = 2.???? = 0.0313*7 = 0.2191 (2.0???); 0.2191*7 = 1.5337 (2.01??); 0.5337*7 = 3.7359 (2.013?); 0.7359*7 = 5.1513 (2.0135);
DecToBase7(171.7500) = 333.???? = 0.7500*7 = 5.25 (333.5???); 0.25*7 = 1.75 (333.51??); 0.7500*7 = 5.25 (333.515?); 0.25*7 = 1.75 (333.5151);
DecToBase7(1.2857) = 1.???? = 0.2857*7 = 1.9999 (1.1???); 0.9999*7 = 6.9993 (1.16??); 0.9993*7 = 6.9951 (1.166?); 0.9951*7 = 6.9657 (1.1666);