{"id":"integer-twos-complement-convert","version":"1.0.0","description":"Reinterpret one fixed-width two's-complement pattern as signed and unsigned; returns both decimals, hex and binary.","supported_operations":["32 bit unsigned to signed two's complement integer","signed integer to unsigned same bits","reinterpret hexadecimal as signed integer","two's complement conversion 8 16 32 64 128 bit","decode negative two's complement value","show signed and unsigned reading of bits"],"unsupported_operations":["change numeric value between widths","ones complement or sign magnitude","floating-point representation"],"semantics":["Integer grammar is -?(0|[1-9][0-9]*|0[xX][0-9a-fA-F]+|0[bB][01]+|0[oO][0-7]+), or a safe JSON integer.","interpret_as validates value in that signed or unsigned range; output reinterprets exactly the same width-bit pattern both ways.","Hex and binary are zero-padded to the explicit width."],"limits":{"max_input_bytes":256,"max_output_bytes":1024,"max_width_bits":128,"max_iterations":128},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["value","width","interpret_as"],"properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":132},{"type":"integer"}]},"width":{"type":"integer","enum":[8,16,32,64,128]},"interpret_as":{"type":"string","enum":["signed","unsigned"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["standard_version","width","hex","binary","signed_decimal","unsigned_decimal"],"properties":{"standard_version":{"type":"string"},"width":{"type":"integer"},"hex":{"type":"string"},"binary":{"type":"string"},"signed_decimal":{"type":"string"},"unsigned_decimal":{"type":"string"}}},"examples":[{"input":{"value":"0xffffffff","width":32,"interpret_as":"unsigned"},"output":{"standard_version":"ISO/IEC 14882:2020 [basic.fundamental]; ISO/IEC 9899:2018 fixed-width unsigned representation","width":32,"hex":"0xffffffff","binary":"0b11111111111111111111111111111111","signed_decimal":"-1","unsigned_decimal":"4294967295"}},{"input":{"value":"-128","width":8,"interpret_as":"signed"},"output":{"standard_version":"ISO/IEC 14882:2020 [basic.fundamental]; ISO/IEC 9899:2018 fixed-width unsigned representation","width":8,"hex":"0x80","binary":"0b10000000","signed_decimal":"-128","unsigned_decimal":"128"}}],"execute_url":"/v1/tools/integer-twos-complement-convert/versions/1.0.0/execute"}