Binary Truncation Calculator
Remove unwanted fractional bits from a binary number. Choose how many bits to keep after the binary point and instantly see the truncated binary value, discarded bits, decimal result, and exact error.
What Is Binary Truncation?
Binary truncation removes fractional bits beyond a selected precision without rounding the retained binary value upward.
Suppose a binary number contains six fractional bits but a system can store only three. Truncation keeps the first three fractional bits and removes the remaining three.
For positive numbers, truncation reduces or preserves the value. For negative values written with an explicit minus sign, truncating the magnitude moves the result toward zero.
How to Truncate a Binary Number
Binary Truncation Is Not the Same as Rounding
Truncation simply removes unwanted bits. Rounding examines the discarded portion and may increase the retained value.
| Original | Keep | Truncated | Nearest Rounded |
|---|---|---|---|
| 10.1111 | 2 bits | 10.11 | 11.00 |
| 101.110101 | 3 bits | 101.110 | 101.111 |
| 1.0011 | 2 bits | 1.00 | 1.01 |
Fractional Bits and Binary Precision
Each binary fractional position represents a negative power of two. Keeping fewer fractional bits means using a larger minimum step between representable values.
| Bits Kept | Smallest Step | Binary Weight |
|---|---|---|
| 0 | 1 | 2⁰ |
| 1 | 0.5 | 2⁻¹ |
| 2 | 0.25 | 2⁻² |
| 3 | 0.125 | 2⁻³ |
| 4 | 0.0625 | 2⁻⁴ |
| 8 | 0.00390625 | 2⁻⁸ |
Truncating Negative Binary Numbers
This calculator accepts signed-magnitude text input such as
-1.1011. When fractional bits are removed, the magnitude
becomes smaller, so the result moves toward zero.
This is different from mathematical floor rounding. Floor would move a negative inexact value toward negative infinity rather than toward zero.
What Is Truncation Error?
The truncation error is the difference between the truncated result and the original value.
If 101.110101₂ equals 5.828125 and it is truncated to
101.110₂, which equals 5.75, the error is:
For positive values the truncation error is normally zero or negative. For negative values truncated toward zero, the error is normally zero or positive.
Where Binary Truncation Is Used
Removing fractional bits when a fixed-point format has limited precision.
Dropping low-order bits when reducing register or datapath width.
Limiting coefficient, sample, or accumulator precision.
Reducing numerical precision to fit memory or processor formats.
Testing how much value is lost when lower binary digits are removed.
Studying precision loss during bit-width reduction and arithmetic operations.
Common Binary Truncation Mistakes
Rounding instead of truncating
Do not increase the retained portion simply because the first discarded bit is 1. Truncation always removes the extra bits.
Removing integer bits
Fractional truncation removes digits to the right of the binary point. It does not remove the integer portion of the value.
Confusing truncation with floor
Truncation and floor behave differently for negative values. Truncation moves toward zero while floor moves toward negative infinity.
Forgetting the selected precision
A result such as 101.110 intentionally retains three
fractional positions, including trailing zeros.