# Talbasiskonvertering

> Konvertér et tal mellem binær, oktal, decimal og hexadecimal online. Genkender præfikserne 0x, 0b og 0o samt tal af enhver længde. Gratis.

Free tool by Orkosi. Page: https://orkosi.com/tools/number-base-converter?lang=da

Skriv et tal i en af de fire baser, programmører bruger, og se det i de tre andre samt det antal bits, det kræver. Ingen størrelsesgrænse, det virker med heltal af enhver længde.

1. Skriv tallet.
2. Angiv, hvilken base det er skrevet i, eller lad Auto stå.
3. Tryk på Konvertér, og se alle fire former.

## Input

| Field | Type | Required | What it is |
| --- | --- | --- | --- |
| `value` | text | yes | Tal. |
| `from` | "auto" \| "decimal" \| "hex" \| "binary" \| "octal" | no | Skrevet i. Default: "auto". |

## Example

Input:

```json
{
  "value": "0xFF",
  "from": "auto"
}
```

Result:

```json
{
  "decimal": "255",
  "binary": "11111111",
  "octal": "377",
  "hex": "FF",
  "bits": 8
}
```

## Run it

It needs a free Orkosi account, nothing else. No credits are used.

- **A person**: open the page, enter an e-mail once, use the tool.
- **Claude or ChatGPT**: add the Orkosi connector `https://orkosi.com/api/v1/public/mcp` and sign in, or create the free account on the sign-in page. Then call `orkosi_run_free_tool` with `{ "tool": "number-base-converter", "input": { … } }`.
- **Any agent or program that can make an HTTP request**:

  1. Once, create the account: `POST https://orkosi.com/api/v1/public/signup` with `{ "name": "…", "email": "…", "terms_accepted": true }` and no key. Ask the person for the e-mail and their agreement to the terms first. The answer carries `data.api_key`, shown once.
  2. Run the tool:

```bash
curl -X POST https://orkosi.com/api/v1/public/tools/number-base-converter/run \
  -H "Authorization: Bearer $ORKOSI_API_KEY" -H "Content-Type: application/json" \
  -d '{"input":{"value":"0xFF","from":"auto"}}'
```

The answer is `{ "data": { "tool": "…", "result": { … } } }`. A call without a key is answered 401 with the signup steps as data.

## Questions

**Hvordan fungerer Auto?**

Et tal, der begynder med 0x, læses som hexadecimal, 0b som binær, 0o som oktal, og alt andet som decimal.

**Er der en maksimal værdi?**

Nej. Konverteringen bruger heltalsaritmetik med vilkårlig præcision, så en 256-bit-hash konverteres nøjagtigt.

**Understøtter den brøker?**

Nej, kun heltal. Negative tal skrives med et minustegn, ikke i to-komplement.

All free tools: https://orkosi.com/tools.md
