{"uid":"cap_0G8ltuHPoIlmwTPo6GkV_","slug":"bitwise-circular-rotate-f21673fa","name":"Bitwise Circular Rotate","description":"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.","url":"https://bitwise.openverbs.com/v1/rotate","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","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}}},"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_ztO77Mtx_HIOV-qn38fuS","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":"Circularly rotates a non-negative integer left or right within an explicit bit width, returning decimal, hex, and binary representations.","exampleAgentPrompt":"Rotate the integer 200 left by 3 bits within a 8-bit width and show me the decimal, hex, and binary result.","exampleUseCases":[{"title":"Cyclic hash mixing in pipeline","prompt":"I need to circular-rotate the value 305441741 to the right by 7 bits within a 32-bit width — can you give me the decimal, hex, and binary output?"},{"title":"Bitmask rotation for hardware register","prompt":"Rotate the bitmask 0b10110001 — that's 177 in decimal — left by 2 bits within an 8-bit field and show me the result in binary and hex."},{"title":"Cryptographic round function check","prompt":"Can you left-rotate the 64-bit value 9823472938472938 by 13 bits and give me back the decimal and hex so I can verify my crypto round function?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:23.758Z","isFirstParty":false}