Binary Fixed-Point Converter
Convert fixed-point binary numbers to decimal or encode decimal values as fixed-point binary. Configure integer bits, fractional bits, signed or unsigned representation, and rounding behavior.
What Is a Binary Fixed-Point Number?
A binary fixed-point number stores a real value using a fixed number of bits for the integer portion and a fixed number of bits for the fractional portion. Unlike floating-point numbers, the binary point stays at a predetermined position.
How Fixed-Point Binary Conversion Works
Integer Bits
Bits to the left of the fixed binary point represent whole-number powers of two. In signed mode, the most significant bit is also the two’s-complement sign bit.
Fractional Bits
Bits to the right represent powers such as 2⁻¹, 2⁻², 2⁻³ and so on. More fractional bits provide finer resolution.
Scaling
A value with F fractional bits uses a scale factor of
2^F. The stored integer is divided by that scale to obtain the real value.
Quantization
Decimal values may not fit the available fractional precision exactly, so they are rounded or truncated to the nearest representable fixed-point value.
Unsigned Fixed-Point Formula
For an unsigned binary word with F fractional bits:
Signed Two’s-Complement Fixed-Point
Signed fixed-point values commonly use two’s-complement representation. The most significant bit determines whether the stored scaled integer is non-negative or negative.
Fixed-Point Resolution
Resolution is the smallest difference between adjacent representable values. It depends entirely on the number of fractional bits.
| Fraction Bits | Resolution | Formula |
|---|---|---|
| 0 | 1 | 2⁰ |
| 2 | 0.25 | 2⁻² |
| 4 | 0.0625 | 2⁻⁴ |
| 8 | 0.00390625 | 2⁻⁸ |
| 16 | 0.0000152587890625 | 2⁻¹⁶ |
Fixed-Point Range
The available numeric range depends on total width, fractional bits and whether the format is signed or unsigned.
Unsigned
Minimum is 0. Maximum is
(2^N - 1) / 2^F.
Signed
Minimum is -2^(N-1) / 2^F and maximum is
(2^(N-1)-1) / 2^F.
Fixed-Point vs Floating-Point
| Feature | Fixed Point | Floating Point |
|---|---|---|
| Binary point | Fixed position | Moves using exponent |
| Hardware | Often simpler | More complex |
| Range | Limited | Very large |
| Precision | Predictable | Varies with magnitude |
| Common use | DSP, embedded systems | General scientific computing |
Common Uses of Binary Fixed-Point
Embedded Systems
Processors without fast floating-point hardware can use scaled integer arithmetic.
Digital Signal Processing
Fixed-point formats are widely used for filters, audio, communications and real-time DSP.
FPGA & Digital Logic
Fixed-width binary arithmetic maps efficiently to hardware registers and arithmetic units.
Control Systems
Predictable precision and deterministic arithmetic can be valuable in real-time control applications.
Important Fixed-Point Considerations
2^-F can be represented.
Related BinaryCon Tools
Binary Fixed-Point Converter FAQs
What is fixed-point binary?
How do I convert fixed-point binary to decimal?
2^F, where F is the number of fractional bits.
What does Q4.4 mean?
What is the resolution with 4 fractional bits?
2^-4 = 0.0625.