# Bitwise NOT (One's-Complement) with Explicit Bit Width

> Bitwise NOT (One's-Complement) with Explicit Bit Width 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-15).

Computes the bitwise one's-complement NOT of a non-negative integer within a specified bit width, returning the result in decimal, hex, and binary.

## Facts

- Endpoint: POST https://bitwise.openverbs.com/v1/not
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bitwise-not-one-s-complement-with-explicit-bit-width-1624136f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MdRE-MVU3K7DKldnlAQ9K

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-not-one-s-complement-with-explicit-bit-width-1624136f -d '<json body>'
```

Example prompt: What's the bitwise NOT of 42 in a 16-bit field? Give me the result in decimal, hex, and binary.

## When to prefer this

Choose this endpoint when you need a precise, width-bounded one's-complement NOT operation on a large or arbitrary-precision integer and want multi-format output (decimal, hex, binary) in a single call. It is especially useful for embedded systems, network mask calculations, checksum algorithms, and digital logic design where bit width is explicit and results must be formatted for multiple representations.

## Known failure modes

- Value does not fit in specified bit width — returns validation error
- Bit width exceeds maximum of 1024 — rejected with schema error
- Non-numeric or negative value string — pattern validation failure
- Missing required fields (value or width) — 400-level error
- Payment not included or insufficient — x402 payment required response

## How this service works

One's-complement NOT of a non-negative integer within an explicit bit width (two's-complement domain). The value must fit in `width` bits. Returns decimal, hex and binary.

## Output

Returns the one's-complement NOT of the input value within the specified bit width as three representations: a decimal integer, a hexadecimal string, and a binary string. All bits within the width are flipped; bits outside the width are ignored.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "value": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer as a decimal string."
      },
      "width": {
       "type": "integer",
       "minimum": 1,
       "maximum": 1024,
       "description": "Bit width the value lives in."
      }
     },
     "required": [
      "value",
      "width"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bitwise-not-one-s-complement-with-explicit-bit-width-1624136f/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)
