{"openapi":"3.1.0","info":{"title":"Bitwise API","version":"1.0.0","description":"Bit-level integer maths as an API, at 8-, 16-, 32- or 64-bit width with exact big-integer arithmetic. The inspect endpoint takes a number (decimal, 0x hex, 0b binary or 0o octal) and returns its decimal, signed (two's-complement), hexadecimal, binary and octal forms, plus the population count (Hamming weight), parity, leading and trailing zero counts, whether it is a power of two, its bit-reversed value and its byte-swapped (endianness) value. The ops endpoint performs a bitwise operation — AND, OR, XOR, NAND, NOR, XNOR, NOT, logical and arithmetic shifts (shl, shr, sar) and rotations (rol, ror) — masked to the chosen width. The bit endpoint sets, clears, toggles or tests an individual bit by index. Everything is computed locally and deterministically, so it is instant and private. Ideal for embedded and systems programming, network-protocol and flag handling, graphics and hashing, emulators and reverse engineering, and teaching binary. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is bit manipulation; for base 2-36 conversion use a base-convert API and for IEEE-754 floating-point bits use a floating-point API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bitwise-api","description":"oanor gateway"}],"tags":[{"name":"Bitwise"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/bit":{"get":{"operationId":"get_v1_bit","tags":["Bitwise"],"summary":"Set/clear/toggle/test a bit","description":"","parameters":[{"name":"value","in":"query","required":true,"description":"Integer","schema":{"type":"string"},"example":"5"},{"name":"index","in":"query","required":true,"description":"Bit index 0..width-1","schema":{"type":"string"},"example":"0"},{"name":"action","in":"query","required":false,"description":"set|clear|toggle|test","schema":{"type":"string"},"example":"toggle"},{"name":"width","in":"query","required":false,"description":"8|16|32|64","schema":{"type":"string"},"example":"8"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"index":0,"action":"toggle","result":{"hex":"0x04","octal":"0o4","width":8,"binary":"00000100","decimal":"4","signed_decimal":"4"},"bit_value":1},"meta":{"timestamp":"2026-06-03T17:42:10.055Z","request_id":"6b56a959-2bcf-4de7-820d-be21c90ca1c8"},"status":"ok","message":"Bit","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/inspect":{"get":{"operationId":"get_v1_inspect","tags":["Bitwise"],"summary":"Inspect an integer at a bit width","description":"","parameters":[{"name":"value","in":"query","required":true,"description":"Integer (dec, 0x, 0b, 0o)","schema":{"type":"string"},"example":"255"},{"name":"width","in":"query","required":false,"description":"8|16|32|64 (default 32)","schema":{"type":"string"},"example":"8"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"hex":"0xff","octal":"0o377","width":8,"binary":"11111111","parity":"even","decimal":"255","byte_swapped":"0xff","leading_zeros":0,"reversed_bits":"0xff","signed_decimal":"-1","trailing_zeros":0,"is_power_of_two":false,"population_count":8},"meta":{"timestamp":"2026-06-03T17:42:10.156Z","request_id":"a26c9408-7c56-4ddd-b777-b6e75269242e"},"status":"ok","message":"Inspect","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/ops":{"get":{"operationId":"get_v1_ops","tags":["Bitwise"],"summary":"Bitwise operation","description":"","parameters":[{"name":"a","in":"query","required":true,"description":"Operand","schema":{"type":"string"},"example":"5"},{"name":"b","in":"query","required":false,"description":"Second operand / shift amount","schema":{"type":"string"},"example":"3"},{"name":"op","in":"query","required":true,"description":"and|or|xor|nand|nor|xnor|not|shl|shr|sar|rol|ror","schema":{"type":"string"},"example":"xor"},{"name":"width","in":"query","required":false,"description":"8|16|32|64","schema":{"type":"string"},"example":"32"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"a":"0x00000005","b":"0x00000003","op":"xor","width":32,"result":{"hex":"0x00000006","octal":"0o6","width":32,"binary":"00000000000000000000000000000110","decimal":"6","signed_decimal":"6"}},"meta":{"timestamp":"2026-06-03T17:42:10.235Z","request_id":"3d743af0-c18a-4162-9cd0-dc2d869f86a1"},"status":"ok","message":"Bitwise op","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Bitwise API","notes":"All operations are masked to the chosen width; negative inputs are folded by two's complement. shr is logical, sar is arithmetic. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/inspect","params":{"value":"an integer (dec, 0x, 0b, 0o)","width":"8|16|32|64 (default 32)"},"returns":"representations, popcount, parity, zero counts, reversed and byte-swapped"},{"path":"/v1/ops","params":{"a":"operand","b":"second operand (or shift/rotate amount)","op":"and|or|xor|nand|nor|xnor|not|shl|shr|sar|rol|ror","width":"8|16|32|64"},"returns":"the result in all representations"},{"path":"/v1/bit","params":{"index":"bit index 0..width-1","value":"an integer","width":"8|16|32|64","action":"set|clear|toggle|test"},"returns":"the bit value and the resulting integer"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Bit-level integer maths as an API, at 8-, 16-, 32- or 64-bit width with exact big-integer arithmetic. The inspect endpoint takes a number (decimal, 0x hex, 0b binary or 0o octal) and returns its decimal, signed (two's-complement), hex, binary and octal forms, plus the population count (Hamming weight), parity, leading and trailing zero counts, whether it is a power of two, its bit-reversed value and its byte-swapped (endianness) value. The ops endpoint performs a bitwise operation — AND, OR, XOR, NAND, NOR, XNOR, NOT, logical and arithmetic shifts (shl, shr, sar) and rotations (rol, ror) — masked to the chosen width. The bit endpoint sets, clears, toggles or tests an individual bit by index. Everything is computed locally and deterministically, so it is instant and private. Ideal for embedded and systems programming, protocol and flag handling, graphics and hashing, emulators, and teaching binary. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is bit manipulation; for base 2-36 conversion use a base-convert API and for IEEE-754 float bits use a floating-point API."},"meta":{"timestamp":"2026-06-03T17:42:10.343Z","request_id":"7be96532-132b-4a45-9f02-db4a6dff5216"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":7135,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":865,"monthly_call_quota":16650,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2855,"monthly_call_quota":217500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6655,"monthly_call_quota":1130000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bitwise-api"}