NEW

ZX Spectrum Floating-Point Number Explorer

Explore the ZX Spectrum's five-byte floating-point format and its short-integer format. Enter a number, change the hexadecimal bytes or click individual bits to see how the Spectrum represents the value.

Five Bytes

Edit the hexadecimal bytes directly. Changes are immediately reflected below.

Binary

Edit Individual Bits

Click any bit to toggle it.

How the Spectrum Stores It

Floating point:
Byte 0 contains the exponent plus 128. The first bit of byte 1 contains the sign, while the remaining 31 bits contain the mantissa.

Short integer:
Byte 0 is zero. Byte 1 identifies the sign, bytes 2 and 3 contain the 16-bit value and byte 4 is zero.

The -65536 INT Bug

The Spectrum ROM is inconsistent in its treatment of integer values around -65536.

The famous example is:

PRINT INT -65536

which produces: -1.

Values such as INT -65535.3 and INT -65535.5 can instead produce the tiny floating-point value: -1E-38.

The explorer deliberately preserves these Spectrum-specific oddities rather than correcting them mathematically.

Interpretation

Decimal value
Exponent
Mantissa
Sign
Last INT Operation
Not applied