la función DEC2HEX

Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp


<span class ="tr_" id="tr_2" data-source="" data-orig="la función DEC2HEX">la función DEC2HEX</span> <Post <Blog | SumProduct son expertos en capacitación de Excel: modelado financiero, modelado de datos estratégicos, auditoría de modelos, planificación y estrategia, cursos de capacitación, consejos y base de conocimiento en línea

keep in mind javascript is needed for full functionality of the web portal.

La función DEC2HEX

Esta función convierte un número decimal (base 10) a hexadecimal (base 16).

The DEC2HEX The function uses the following syntax to operate:

DEC2HEX (number, [places])

The DEC2HEX The function has the following arguments:

  • number: esto es obligatorio y representa el entero decimal que desea convertir. And number is negative, places es ignorado y DEC2HEX devuelve un número hexadecimal de 10 characters (40 bits) en el que el bit más significativo es el bit de signo. The 39 bits restantes son bits de magnitud. Negative numbers se representan usando notación en complemento a dos
  • places: this argument is optional. Este es el número de caracteres a usar. And places is omitted, DEC2HEX use the minimum number of characters necessary. The argument places it is useful for padding the return value with leading zeros.

El complemento a dos es una operación matemática sobre números binarios, as well as a representation of signed binary numbers based on this procedure. El complemento a dos de un número de N bits se establece como el complemento con respecto a 2N; In other words, es el resultado de restar el número de 2N. This is also equivalent to taking the complement of ones and then adding one, since the sum of a number and the complement of its ones is 1 bits. The two's complement of a number behaves like the negative of the original number in most arithmetic operations, and positive and negative numbers can coexist naturally.

It should be noted at the same time that:

  • And number it is <-549,755,813,888 o si number es> 549,755,813,887, DEC2HEX return the #ON ONE! error value
  • And number it is not numeric, DEC2HEX return the #VALUE! error value
  • si el resultado de DEC2HEX necesita más que el número de especificados places characters, return the #ON ONE! error value. As an example, DEC2HEX (64,1) devuelve el valor de error debido a que el resultado (40) necesita dos caracteres
  • And places it is not a whole number, the value of places is truncated
  • And places it is not numeric, DEC2HEX return the #VALUE! error value
  • And places is negative, DEC2HEX return the #ON ONE! error value.

Please, see my example below:

Soon we will continue with our functions from A to Z of Excel. Keep checking: there is a new blog post every business day.

You can find a full page of the feature posts here.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.