← All tool references

Math · not_available

Binary Calculator

Perform arithmetic and bitwise operations on two binary integers.

Open public tool

Overview

Category
Math
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/binary-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/binary-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

binary_a · string · required
Enter the first binary value used by this tool.
binary_b · string · required
Enter the second binary value used by this tool.
operation · string · required
Enter the operation used by this tool. Accepted values: add, subtract, multiply, divide, and, or, xor.
{
    "type": "object",
    "properties": {
        "binary_a": {
            "type": "string",
            "description": "Enter the first binary value used by this tool."
        },
        "binary_b": {
            "type": "string",
            "description": "Enter the second binary value used by this tool."
        },
        "operation": {
            "type": "string",
            "description": "Enter the operation used by this tool.",
            "enum": [
                "add",
                "subtract",
                "multiply",
                "divide",
                "and",
                "or",
                "xor"
            ]
        }
    },
    "required": [
        "binary_a",
        "binary_b",
        "operation"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

binary_result · string
Binary result produced by the tool.
decimal_result · number
Decimal result produced by the tool.
decimal_a · number
First decimal value produced by the tool.
decimal_b · number
Second decimal value produced by the tool.
operation_summary · string
Operation summary produced by the tool.
{
    "type": "object",
    "properties": {
        "binary_result": {
            "type": "string",
            "description": "Binary result produced by the tool."
        },
        "decimal_result": {
            "type": "number",
            "description": "Decimal result produced by the tool."
        },
        "decimal_a": {
            "type": "number",
            "description": "First decimal value produced by the tool."
        },
        "decimal_b": {
            "type": "number",
            "description": "Second decimal value produced by the tool."
        },
        "operation_summary": {
            "type": "string",
            "description": "Operation summary produced by the tool."
        }
    },
    "additionalProperties": false
}

Binary Calculator example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/binary-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "binary_a": "101101",
    "binary_b": "1101",
    "operation": "add"
}'
{
    "ok": true,
    "data": {
        "slug": "binary-calculator",
        "result": {
            "values": {
                "binary_result": "111010",
                "decimal_result": 58,
                "decimal_a": 45,
                "decimal_b": 13,
                "operation_summary": "101101 add 1101"
            },
            "display": {
                "display": "111010"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.