# Bitwise Circular Rotate

> Bitwise Circular Rotate is a paid API for AI agents from bitwise.openverbs.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Circularly rotates a non-negative integer left or right within an explicit bit width, returning decimal, hex, and binary representations.

## Facts

- Endpoint: POST https://bitwise.openverbs.com/v1/rotate
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bitwise-circular-rotate-f21673fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0G8ltuHPoIlmwTPo6GkV_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bitwise-circular-rotate-f21673fa -d '<json body>'
```

Example prompt: Rotate the integer 200 left by 3 bits within a 8-bit width and show me the decimal, hex, and binary result.

## When to prefer this

Choose this endpoint when you need a true circular (barrel) rotation — where bits wrap around — rather than a logical or arithmetic shift that discards the overflowed bits. It is the correct choice for cryptographic round functions, CRC computations, hardware register manipulation, or any algorithm explicitly requiring rotate-left or rotate-right semantics. It supports arbitrary precision up to 1024 bits, making it suitable for both small (8/16/32/64-bit) and large custom-width integers.

## Known failure modes

- Value does not fit in specified bit width — request rejected with validation error
- Width or amount outside allowed range (1–1024) — returns 400-level error
- Non-numeric or negative value string — pattern validation failure
- Amount equal to or multiple of width — returns original value (valid but trivial)
- Payment not provided or insufficient — x402 payment required error

## How this service works

Circularly rotate a non-negative integer left or right within an explicit bit width (bits shifted off one end reappear at the other). The value must fit in `width` bits. Returns decimal, hex and binary.

## Output

Returns an object with the rotated value expressed in three representations: decimal integer, hexadecimal string, and binary string. Bits shifted off the high end (left rotate) reappear at the low end, and vice versa, strictly within the declared bit width.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "value",
      "amount",
      "direction",
      "width"
     ],
     "properties": {
      "value": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer as a decimal string."
      },
      "width": {
       "type": "integer",
       "maximum": 1024,
       "minimum": 1,
       "description": "Bit width to rotate within."
      },
      "amount": {
       "type": "integer",
       "maximum": 1024,
       "minimum": 0,
       "description": "Number of bits to rotate."
      },
      "direction": {
       "enum": [
        "left",
        "right"
       ],
       "type": "string",
       "description": "Rotate direction."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bitwise-circular-rotate-f21673fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bitwise.openverbs.com](https://www.zero.xyz/host/bitwise.openverbs.com/llms.txt)
