Fixed-point converter

Float ↔ fixed in any Q-format. Pick a word width and Q-factor — the integer-bits exponent E, the value range and the LSB follow — then convert a value with your choice of rounding and saturation.

The Q-format

For a signed N-bit type the Q-factor (fractional bits) and the integer-bits exponent E satisfy E = (N − 1) − Q. Edit either field — the other follows.

Convert a value

Bulk mode (comma- or whitespace-separated)

What the result means

← All tools