liveBook · Manning

Q-format

Q-format is a convention for representing fixed-point numbers that specifies the allocation of bits to the signed integer and fractional portions.

How 2 Manning books explain it

Quantization and Fast Inference

Q-format notation specifies how a fixed-point number's bits are allocated between its integer and fractional components.

How it is used
Represents real-valued quantities using stored integers and a power-of-two scale.
How deep it goes
Works through scaling, signed two's-complement decoding, and range–precision tradeoffs with numerical examples.
Examples
Uses Q3.4 encodings for 1.5 and 1111 1111, plus a fixed-width range–precision comparison.
What you can do after
Apply Q-format by converting between real values and scaled integers.

Read how Quantization and Fast Inference explains q-format →

Rust in Action: Systems programming concepts and techniques

Q format is a fixed-point numeric representation convention that allocates bits between a signed integer encoding and a fractional scale.

How it is used
Represents values compactly when fixed-point storage is preferable, including systems without floating-point hardware.
How deep it goes
Defines Q7 storage and conversion mechanics, but does not develop broader fixed-point arithmetic.
Examples
Uses Q7 conversion listings, boundary cases, f32 and f64 conversions, and passing Rust tests.
What you can do after
Build it from scratch as a Rust Q7 type with floating-point conversions and boundary tests.

Read how Rust in Action: Systems programming concepts and techniques explains q-format →

Related concepts

Questions about q-format

What is q-format?

Q-format is a convention for representing fixed-point numbers that specifies the allocation of bits to the signed integer and fractional portions.

Which Manning books explain q-format?

Quantization and Fast Inference and Rust in Action: Systems programming concepts and techniques.

What kinds of q-format are there?

Kinds of q-format include q3.4.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.