{"uid":"cap_MdRE-MVU3K7DKldnlAQ9K","slug":"bitwise-not-one-s-complement-with-explicit-bit-width-1624136f","name":"Bitwise NOT (One's-Complement) with Explicit Bit Width","description":"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.","url":"https://bitwise.openverbs.com/v1/not","method":"POST","headers":{},"bodySchema":{"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","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 the value lives in."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4VjNpKzR6gjR_MTZIP7Ur","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"What's the bitwise NOT of 42 in a 16-bit field? Give me the result in decimal, hex, and binary.","exampleUseCases":[{"title":"Invert mask for network filtering","prompt":"I have a subnet mask of 255 and I'm working in an 8-bit field — can you flip all the bits to get the inverse mask in decimal, hex, and binary?"},{"title":"Flip control register bits in firmware","prompt":"In my 32-bit microcontroller register, the current value is 305441741 — compute the bitwise NOT so I know which bits are unset."},{"title":"One's complement for checksum algorithm","prompt":"I need the one's complement of 1023 within a 10-bit width for a checksum calculation — show me the decimal, hex, and binary results."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:39:55.366Z","isFirstParty":false}