# Hexadecimal (Base16)

## Descripción

Hexadecimal (Base16) comienza con 0 y cuenta hasta 9. Sin embargo, en lugar de insertar el siguiente número a la derecha, se utilizan las primeras seis letras del alfabeto.

```
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
```

Un byte, que son ocho bits, incluye exactamente dos números hexadecimales, es decir, en cada byte hay dos números hexadecimales (4 bits cada uno).

## Conversiones

Conversión de hexadecimal a decimal.

```shell
echo "ibase=16 ; <hexadecimal>" | bc
echo "ibase=16 ; A" | bc

bindechexascii --h2d <hexadecimal>
bindechexascii --h2d A
```

Conversión de decimal a hexadecimal.

```shell
echo "obase=16 ; <decimal>" | bc
echo "obase=16 ; 10" | bc

bindechexascii --d2h <decimal>
bindechexascii --d2h 10
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cryptography.mrw0l05zyn.cl/encoding-codificacion/hexadecimal-base16.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
