Binary, hex, octal and decimal integer calculator
binary_calculatorAdd, subtract, multiply, divide or apply bitwise operators to integers in binary, hexadecimal, octal or decimal, or convert a value into every base. Optional 8, 16, 32 or 64-bit wrapping, with or without two's complement. Input is not stored.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "binary_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | First operand, or the value to convert | |
| b | No | Second operand (not used for convert or not) | |
| op | No | calculate (default) plus one of add, sub, mul, div, mod, and, or, xor, nand, nor, not, shl, shr, sar; or convert | |
| base | No | Input base, default bin | |
| width | No | Bit width, default auto | |
| signed | No | Treat a fixed width as signed two's complement |