A 32-bit floating-point (FP32) front end has already checked the exponent and fraction fields and provides three condition signals. Complete the missing connections in the supplied circuit so it classifies the value as Zero, Subnormal, Normal, Infinity, or Not a Number (NaN).
The supplied condition signals mean:
EXP_ZERO = 1 when the exponent field is all 0s.EXP_ONES = 1 when the exponent field is all 1s.FRAC_ZERO = 1 when the fraction field is all 0s.EXP_ZERO and EXP_ONES are mutually exclusive.
Constraints
EXP_ZERO, EXP_ONES, FRAC_ZEROZero, Subnormal, Normal, Infinity, NaN| Exponent condition | Fraction condition | Classification |
|---|---|---|
EXP_ZERO = 1 | FRAC_ZERO = 1 | Zero |
EXP_ZERO = 1 | FRAC_ZERO = 0 | Subnormal |
EXP_ZERO = 0, EXP_ONES = 0 | Either | Normal |
EXP_ONES = 1 | FRAC_ZERO = 1 | Infinity |
EXP_ONES = 1 | FRAC_ZERO = 0 | NaN |
Advanced arithmetic circuits use specialized structures to optimize and trade off speed, area, throughput, numerical range, and precision in processor, DSP, accelerator, and semiconductor datapaths.
In a Ripple-Carry Adder, each stage waits for the previous carry, so delay increases as the adder width grows. A Carry-Lookahead Adder (CLA) reduces this delay by calculating carry conditions directly from the input bits.
For each bit i:
Gi = Ai · Bi Generate
Pi = Ai ⊕ Bi Propagate
Gi = 1 means bit i generates a carry, while Pi = 1 means an incoming carry can propagate through that bit.

The next carry is:
Ci+1 = Gi + Pi·Ci
For a 4-bit CLA with C0 = Cin:
C1 = G0 + P0·C0
C2 = G1 + P1·G0 + P1·P0·C0
C3 = G2 + P2·G1 + P2·P1·G0 + P2·P1·P0·C0
C4 = G3 + P3·G2 + P3·P2·G1 + P3·P2·P1·G0 + P3·P2·P1·P0·C0
Because C1 to C4 are derived directly from P, G, and Cin, the carry does not need to ripple through all four adder stages.
The sum and final carry are:
Si = Pi ⊕ Ci, i = 0...3
Cout = C4
The basic CLA architecture is:
A[3:0],B[3:0],Cin -> P/G Logic -> Lookahead Carry Logic -> Sum Logic -> Sum[3:0],Cout
For wider adders, each 4-bit CLA block can also generate Group Propagate and Group Generate signals:
PG = P3·P2·P1·P0
GG = G3 + P3·G2 + P3·P2·G1 + P3·P2·P1·G0
The block carry is:
Cout = GG + PG·Cin
This allows carry lookahead to be applied between multiple CLA blocks:
4-bit CLA Blocks -> Group P/G -> Higher-Level Lookahead -> Carry Between CLA Blocks
A CLA therefore uses additional carry-generation logic to reduce carry-propagation delay, making it suitable for faster arithmetic datapaths.

A Carry-Select Adder (CSLA) reduces carry waiting by calculating the next block twice: once with assumed Cin = 0 and once with assumed Cin = 1.
For an upper block:
{S0,Cout0} = Ablock + Bblock + 0
{S1,Cout1} = Ablock + Bblock + 1
When the real carry Csel arrives from the lower block, MUXes select the correct precomputed result:
Si = Csel'·S0i + Csel·S1i
Cout = Csel'·Cout0 + Csel·Cout1
Ablock,Bblock -> Add(Cin=0) --\
-> MUX(Csel) -> Selected Sum,Cout
Ablock,Bblock -> Add(Cin=1) --/
The arithmetic is completed before Csel arrives, so only the MUX selection remains on the final carry-dependent path. The trade-off is duplicated adder hardware.

Parallel-prefix adders use the same bit propagate and generate signals as CLA:
Gi = Ai·Bi
Pi = Ai ⊕ Bi
A prefix node combines two adjacent groups. If (Gu,Pu) is the upper group and (Gl,Pl) is the lower group:
Gcombined = Gu + Pu·Gl
Pcombined = Pu·Pl
Repeated prefix stages build the generate/propagate pair for wider bit ranges. A compact 4-bit Kogge-Stone-style prefix tree is:

Stage 1 forms the 1:0, 2:1, and 3:2 groups. Stage 2 extends the required groups to 2:0 and 3:0. Cin is then combined with each group pair to generate the actual carries.
Once the prefix pair for bits i:0 is available:
Ci+1 = G(i:0) + P(i:0)·Cin
Si = Pi ⊕ Ci
The same combine equations are implemented repeatedly as a tree, giving approximately logarithmic carry-distribution depth.
| Architecture | Main Strength | Main Cost |
|---|---|---|
| Kogge-Stone | Low logic depth | More prefix nodes and dense routing |
| Brent-Kung | Fewer nodes and simpler routing | Greater logic depth |
Kogge-Stone is attractive when timing dominates, while Brent-Kung reduces routing and node count when area/interconnect matter more.


Addition and subtraction can share the same arithmetic path using two's-complement subtraction:
Result = A + (B ⊕ SUB) + SUB
B -> XOR(SUB) --\
-> Adder -> Result
A --------------/
SUB ------------> Cin
SUB = 0 leaves B unchanged with Cin = 0. SUB = 1 inverts B and sets Cin = 1:
A - B = A + B' + 1
At each bit:
Xi = Bi ⊕ SUB
Si = Ai ⊕ Xi ⊕ Ci
Ci+1 = Ai·Xi + Ai·Ci + Xi·Ci
Thus, one adder performs both operations.

Arithmetic status signals describe how the result should be interpreted.
Carry = CN
Borrow = SUB · Cout'
Overflow = C(N-1) ⊕ CN
Zero = (S0 + S1 + ... + S(N-1))'
Negative = S(N-1)
0.0.Carry and signed overflow are different. For example, adding two positive signed values can produce a negative result even when the carry signal alone does not indicate the signed error.
| Architecture | Timing Characteristic | Main Cost | Typical Fit |
|---|---|---|---|
| CLA | Direct carry lookahead | Extra carry-generation logic | Small/medium timing-critical adders |
| Carry-Select | Precomputation followed by final MUX selection | Duplicated arithmetic blocks | Designs that can trade area for shorter carry-dependent delay |
| Kogge-Stone | Low prefix depth | More prefix nodes and dense routing | Aggressive timing targets |
| Brent-Kung | Greater prefix depth | Fewer nodes and lighter routing | Area/routing-sensitive designs |
The suitable architecture depends on width, timing target, area, and routing constraints rather than one adder being universally best.
Most hardware multipliers can be viewed as three stages:
Operands -> Partial-Product Generation -> Reduction -> Final Addition -> Product
For an unsigned multiplier, each partial-product bit is:
PP(i,j) = Ai · Bj
For a 4-bit multiplier, each multiplier bit either selects a shifted copy of A or contributes zero:
B0=1 -> PP0 = A<<0 B0=0 -> PP0 = 0
B1=1 -> PP1 = A<<1 B1=0 -> PP1 = 0
B2=1 -> PP2 = A<<2 B2=0 -> PP2 = 0
B3=1 -> PP3 = A<<3 B3=0 -> PP3 = 0
Different multiplier architectures mainly change how the partial products are generated and reduced.
An iterative multiplier reuses one adder across several clock cycles, reducing hardware at the cost of latency.
One common unsigned implementation uses a 2N-bit shifted multiplicand register M, an N-bit multiplier register Q, and a 2N-bit accumulator ACC.
At load:
ACC = 0
M = ZeroExtend(A,2N)
Q = B
Count = 0
During each iteration, Q0 controls a MUX in front of the shared adder:
ADDEND = M when Q0=1, otherwise 0
ACCnext = ACC + ADDEND
Mnext = M << 1
Qnext = Q >> 1
Countnext = Count + 1
Q0 -> ADDEND MUX -> Shared Adder -> ACC
M -> Shift Left ------------------^
Q -> Shift Right -> Next Q0
After N iterations:
Product = ACC
Start loads the registers. During operation:
Busy = 1 while iterations remain
Done = 1 when the final iteration completes
The circuit therefore trades multiple cycles for one reused adder.
Radix-4 Modified Booth reduces the number of partial-product rows by examining overlapping groups of three multiplier bits.
Use:
Q[-1] = 0
For a 4-bit multiplier:
Q3 Q2 Q1 Q0 Q[-1] -> {Q1,Q0,Q[-1]} , {Q3,Q2,Q1}
For one Booth group {y2,y1,y0}, the recoder selects one multiple of M:
| Booth Group | Selected Multiple |
|---|---|
000, 111 | 0 |
001, 010 | +M |
011 | +2M |
100 | -2M |
101, 110 | -M |
The recoder can be viewed as one-hot select logic:
SEL_0 = y2'·y1'·y0' + y2·y1·y0
SEL_+M = y2'·(y1 ⊕ y0)
SEL_-M = y2 ·(y1 ⊕ y0)
SEL_+2M = y2'·y1·y0
SEL_-2M = y2 ·y1'·y0'
For signed 4-bit operands, first sign-extend the multiplicand to the 6-bit internal multiple path:
Mw = SignExtend(M,6)
+M = Mw
+2M = Mw << 1
-M = Mw' + 1
-2M = (Mw << 1)' + 1
Each Booth group selects one of these values. The selected signed multiple is sign-extended to the partial-product/reduction width and group k is then shifted by 2k bit positions:
Booth Group -> Recoder -> Multiple MUX -> Shift by 2k -> Partial Product
The widened path is important for the most-negative operand because values such as -(-8) and 2×(-8) cannot be safely formed in only four signed bits.
Radix-4 Booth therefore reduces the number of partial-product rows while adding recoding and multiple-selection logic.
When several partial-product bits have the same weight, propagating carry after every addition would create a long delay.
A 3:2 compressor uses the full-adder equations in each weight column k:
Sk = Xk ⊕ Yk ⊕ Zk
Ck+1 = Xk·Yk + Xk·Zk + Yk·Zk
Sk remains in column k, while Ck+1 moves to the next higher-weight column.
3 Same-Weight Bits -> 3:2 Compressor -> Sum[k] + Carry[k+1]
A Wallace tree applies these compressors in parallel according to the height of each bit-weight column. The exact number of compression levels depends on the column heights.
Conceptual Wallace reduction tree:

The final product is:
Product = SumRow + CarryRow
The compressor stages avoid global carry propagation; only the final two-row addition requires a normal carry-propagate adder.
A Multiply-Accumulate (MAC) combines multiplication with accumulator feedback:
P = A × B
ACCnext = ACC + P
A,B -> Multiplier -> Adder -> ACC Register -> Feedback
A practical MAC often selects the next accumulator input with a control MUX:
Clear -> ACC_D = 0
Load -> ACC_D = P
Accumulate -> ACC_D = ACC + P
Hold -> ACC_D = ACC
0, P, ACC+P, ACC -> Control MUX -> ACC Register
Assume one MAC operation is selected at a time. The selected value is loaded on the active clock edge.
Repeated accumulation can exceed the width of one product, so the accumulator is often wider than the multiplier output. These extra guard bits reduce overflow risk before the final result is narrowed.
Pipeline registers divide multiplication and accumulation into shorter timing stages so new transactions can enter before older ones have completed.
For the 2-cycle reference latency, input-capture registers define the transaction acceptance edge. The two compute stages are multiplication and accumulation.

The register updates are:
Edge k : A0 <= A, B0 <= B, C0 <= C, V0 <= Valid_in
Edge k+1 : P1 <= A0×B0, C1 <= C0, V1 <= V0
Edge k+2 : Result <= P1+C1, Valid_out <= V1
Therefore:
Latency = 2 cycles
II = 1 cycle
Latency is measured from the input acceptance edge to the corresponding result edge, while initiation interval (II) is the spacing between accepted transactions. II = 1 assumes the pipeline can accept a transaction every cycle with no stall or backpressure condition.
Because a new transaction may be captured every cycle, the delayed C and Valid paths must remain aligned with the matching product through both compute stages.
An iterative divider repeatedly updates the partial remainder and quotient using one shared add/subtract path.
Dividend,Divisor -> Shift/Add-Subtract -> Partial Remainder,Quotient -> Counter/Control -> Next Iteration
The datapath normally includes:
For 4-bit restoring and non-restoring division, EWskills uses a 5-bit signed partial remainder so negative intermediate values are representable.
Restoring division performs a trial subtraction during each iteration.
For quotient Q, divisor D, and signed partial remainder R, extend the divisor to the partial-remainder width:
Dext = ZeroExtend(D, R_width)
Rshift = {R(R_width-2:0), Q(N-1)}
T = Rshift - Dext
Neg = T(MSB)
Qbit = Neg'
Rnext = T when Neg=0, otherwise Rshift
Qnext = {Q(N-2:0), Qbit}
Shift -> Subtract D -> Sign Test -> R MUX -> Rnext
\----> Qbit -> Qnext
A negative trial selects Rshift, effectively discarding the subtraction; a non-negative trial keeps T. This is the restore operation.
Non-restoring division avoids immediately restoring every negative partial remainder. The previous remainder sign selects the next arithmetic operation.
For each iteration, use the divisor extended to the partial-remainder width:
Dext = ZeroExtend(D, R_width)
Rshift = {R(R_width-2:0), Q(N-1)}
T = Rshift - Dext when R>=0, otherwise Rshift + Dext
Qbit = T(MSB)'
Qnext = {Q(N-2:0), Qbit}
Rnext = T
R Sign -> Add/Subtract Select -> Rshift ± D -> Sign Test -> Qbit
The same add/subtract datapath is reused: a non-negative remainder selects subtraction, while a negative remainder selects addition.
After the final iteration:
Rfinal = R + Dext when R<0, otherwise R
| Restoring | Non-Restoring |
|---|---|
| Negative trial is immediately discarded/restored | Negative remainder may continue |
| Restore decision occurs in the same iteration | Next operation depends on remainder sign |
| Simpler conceptual flow | Fewer explicit restore operations |
Signed division can reuse an unsigned magnitude divider by adding magnitude-conversion logic before it and sign-restoration logic after it.
For dividend A and divisor B:
Qsign = A(N-1) ⊕ B(N-1)
Rsign = A(N-1)
Amag = A when A(N-1)=0, otherwise A' + 1
Bmag = B when B(N-1)=0, otherwise B' + 1
Signed Inputs -> Magnitude Logic -> Unsigned Divider -> Sign Restore -> Signed Q,R
Amag and Bmag are interpreted as unsigned magnitudes during the core division. For example, 4-bit 1000 represents signed -8 before magnitude conversion but unsigned magnitude 8 inside the divider.
After magnitude division:
Q = Qmag when Qsign=0, otherwise Qmag' + 1
R = Rmag when Rsign=0, otherwise Rmag' + 1
EWskills uses:
Quotient -> truncate toward zero
Remainder -> same sign as dividend
Example:
-7 / 3 = -2 remainder -1
Two important conditions are detected before normal iterations begin.
Divide-by-zero can be implemented with a zero detector on the divisor:
DivZero = (D0 + D1 + ... + D(N-1))'
Signed overflow occurs for the most-negative dividend divided by -1:
IsMIN = A(N-1)·A(N-2)'·...·A0'
IsMinus1 = B(N-1)·B(N-2)·...·B0
Overflow = IsMIN · IsMinus1
For 4-bit signed data:
MIN = -8
-8 / -1 = +8
+8 is outside the 4-bit signed range -8...+7, so normal division must not begin as though the result were representable.
Higher-radix dividers determine more quotient information per iteration and therefore require fewer iterations.
More Quotient Bits per Iteration -> Fewer Iterations -> More Complex Selection Logic
SRT-style division is one example. Detailed quotient-selection mathematics is outside this Quick Guide.
A barrel shifter performs a variable shift in one combinational operation using cascaded MUX stages.
For 4-bit data, two stages are enough:
X[3:0] -> Shift-by-1 Stage[S0] -> Shift-by-2 Stage[S1] -> Y[3:0]
SHAMT[1:0] | Total Shift |
|---|---|
00 | 0 |
01 | 1 |
10 | 2 |
11 | 3 |
S0 = SHAMT[0]
S1 = SHAMT[1]
Each output of a stage is a 2:1 MUX:
MUX(S,D0,D1) = S'·D0 + S·D1
Using vector notation:
Y1[i] = S0'·X[i] + S0·SRC1[i]
Y[i] = S1'·Y1[i] + S1·SRC2[i]
SRC1 defines where each bit comes from for a shift by 1, while SRC2 defines the source for an additional shift by 2. The operation type changes these source connections; the two-stage MUX structure remains the same.
An N-bit barrel shifter therefore needs approximately log2(N) controlled shift stages.
Logical shifts fill newly opened positions with 0.
For a 4-bit logical-right shifter:
SRC1[3:0] = {0, X3, X2, X1}
SRC2[3:0] = {0, 0, Y1[3], Y1[2]}
Using the stage equations defined above, these sources directly form the shift-by-1 and shift-by-2 MUX network.
For a 4-bit logical-left shifter:
SRC1[3:0] = {X2, X1, X0, 0}
SRC2[3:0] = {Y1[1], Y1[0], 0, 0}
Example:
1011 << 1 -> 0110 1011 >> 1 -> 0101
Arithmetic right shift uses the same MUX stages as logical right shift, but the newly opened MSB positions are filled with the original sign.
For 4-bit input X[3:0]:
SRC1[3:0] = {X3, X3, X2, X1}
SRC2[3:0] = {Y1[3], Y1[3], Y1[3], Y1[2]}
Using the same stage equations, Y1[3] remains equal to the original sign bit, so the second stage also replicates the correct sign.
1010 (-6) -> ASR 1 -> 1101 (-3)
Rotate operations wrap shifted-out bits to the opposite side instead of replacing them with zeros.
For a 4-bit rotate-right network:
SRC1[3:0] = {X0, X3, X2, X1}
SRC2[3:0] = {Y1[1], Y1[0], Y1[3], Y1[2]}
The same two-stage equations are used; only the wrapped source connections change.
Example:
1011 -> ROR 1 -> 1101
Logical, arithmetic, and rotate operations can therefore share the same staged-MUX idea; the main difference is the source selected for the shifted-in positions. Rotate-left uses the same stages with the wrapped source connections reversed.
Barrel shifters are used for ALU shifting, scaling, bit manipulation, address operations, fixed-point rescaling, and floating-point alignment/normalization.
A fixed-point number stores an integer while assuming a fixed binary-point position.
If a stored integer uses F fractional bits:
Value = Stored Integer × 2^-F
Example:
Stored = 0110
F = 2
Value = 6 × 2^-2 = 1.5
A common notation is Qm.n, where n indicates the number of fractional bits and m identifies the integer-side width.
Qm.n -> m integer-side bits, n fractional bits
Because conventions differ on whether the sign bit is included in m, a design should explicitly state:
Total Width + Signedness + Fractional-Bit Count
This avoids ambiguity about the implied binary-point position.
The fractional-bit count determines the smallest representable step:
Resolution = 2^-F
For a signed N-bit value with F fractional bits:
Minimum = -2^(N-F-1)
Maximum = 2^(N-F-1) - 2^-F
Increasing F improves resolution but leaves fewer bits for integer range.
For example:
F=2 -> Resolution = 0.25
A value that does not fall exactly on a representable step must be approximated. This loss of precision is quantization.
Intermediate arithmetic may require more bits than the destination format.
For signed addition, one extra internal range bit can preserve the full mathematical result:
SumWide = SignExtend(A,N+1) + SignExtend(B,N+1)
For multiplication:
Wproduct = WA + WB
Fproduct = FA + FB
A multiply-accumulate path therefore commonly uses:
A,B -> Full-Width Product -> Fraction Align -> Wider ACC -> Round/Saturate -> Destination
Addition requires both operands to use the same binary-point position. If the product and accumulator use different fractional-bit counts:
ProductAligned = Rescale(Product, Fproduct -> FACC)
ACCnext = ACC + SignExtend(ProductAligned)
The wider internal path prevents range or precision from being discarded before the final narrowing stage.
If operand A has FA fractional bits and B has FB fractional bits, and the destination uses Fdest fractional bits:
RawProduct = A × B
Fraw = FA + FB
Shift = Fraw - Fdest
Shift > 0 -> Rescaled = RawProduct >>> Shift
Shift = 0 -> Rescaled = RawProduct
Shift < 0 -> Rescaled = RawProduct << (-Shift)
The full product is kept before conversion to the destination format:
A,B -> Wide Multiply -> RawProduct -> Rescale -> Round/Saturate -> Output
For example, multiplying two values that each have 2 fractional bits produces a raw product with 4 fractional bits. Returning to a format with 2 fractional bits requires a right shift by 2.
Truncation discards the low-order fractional bits during rescaling. Here, truncation refers to fixed-point bit reduction; it is not the signed-division truncation-toward-zero rule:
Truncated = X >>> Shift
For EWskills fixed-point arithmetic, rounding uses round-to-nearest, ties away from zero. For Shift > 0, a compact implementation works on the magnitude:
Half = 1 << (Shift-1)
MagRounded = (|X| + Half) >> Shift
Rounded = MagRounded when X>=0, otherwise -MagRounded
Form |X| in a sufficiently wide internal path so the most-negative signed value remains representable. Adding Half before shifting makes an exact half-way value increase in magnitude, implementing ties away from zero.
Example for a destination step of 0.25:
+1.375 -> +1.50
-1.375 -> -1.50
Rounding logic is normally placed before final width narrowing, so the decision can use the discarded bits.
If a narrowed result exceeds the destination range, the output may either wrap or saturate.
After the value has been rescaled to the destination binary-point position, compare its stored integer representation against the signed destination code limits:
MAXcode = 2^(N-1)-1
MINcode = -2^(N-1)
Y = MAXcode when X>MAXcode
Y = MINcode when X<MINcode
Y = X otherwise
Wide Result -> Compare with MIN/MAX -> Output MUX -> N-bit Result
A MAC or accumulator often keeps additional guard bits internally:
Products -> Wide Accumulator -> Round -> Saturate -> Output
These bits provide extra range and allow rounding/saturation to occur only when the final destination width is required.
A fixed-point format should be selected from the required range and resolution:
Required Range -> Integer Bits Required Resolution -> Fractional Bits
For a fixed total width, increasing one reduces the available bits for the other. The design therefore balances range, precision, overflow margin, and hardware width.
IEEE-style FP32 uses three fields:
| Sign:1 | Exponent:8 | Fraction:23 |
For a normal value:
Value = (-1)^S × 1.Fraction × 2^(Exponent-127)
The exponent is stored with a bias of 127, and normal values use an implicit leading 1 in the significand.
Exponent and fraction patterns identify the FP32 number class.
A classifier can first generate three detectors:
ExpZero = (E7 + E6 + ... + E0)'
ExpOnes = E7·E6·...·E0
FracZero = (F22 + F21 + ... + F0)'
The class outputs then follow directly:
IsZero = ExpZero·FracZero
IsSubnormal = ExpZero·FracZero'
IsInfinity = ExpOnes·FracZero
IsNaN = ExpOnes·FracZero'
IsNormal = ExpZero'·ExpOnes'
| Exponent | Fraction | Class |
|---|---|---|
0 | 0 | Zero |
0 | nonzero | Subnormal |
1...254 | any | Normal |
255 | 0 | Infinity |
255 | nonzero | NaN |
Subnormal values do not use the implicit leading 1. This classifier logic is also the basis for bypassing the normal arithmetic path when a special value is detected.
Floating-point values with different exponents must first be aligned to the same scale.
Unpack -> Compare Exponents -> Align -> Add/Subtract -> Normalize -> Round -> Repack
For normal finite operands, first align the lower-exponent significand to the larger exponent:
Ework = max(EA,EB)
Shift = |EA - EB|
Maligned = MlowerExponent >> Shift
Bits shifted out during alignment are retained as Guard, Round, and Sticky (GRS) information for later rounding.
After alignment, compare the two aligned magnitudes when subtraction is required:
SameSign = (SA ⊕ SB)'
SameSign=1 -> Mraw = MA_aligned + MB_aligned
SameSign=0 -> Mraw = Mlarge - Msmall
For unlike signs, Mlarge and Msmall refer to the larger and smaller aligned magnitudes, and the result sign follows the operand with the larger magnitude.
Exponent Compare -> Align Smaller Significand + GRS -> Add/Subtract -> Normalize -> Round
The alignment barrel shifter, add/subtract unit, normalization logic, and rounding logic therefore form the main FP add/sub datapath.
Floating-point multiplication processes sign, exponent, and significand largely in parallel.
Unpack -> Sign/Exponent/Significand Operations -> Normalize -> Round -> Repack
For normal finite FP32 operands:
Sresult = SA ⊕ SB
Eraw = EA + EB - 127
Mraw = (1.FA) × (1.FB)
Mnorm = Mraw, Enorm = Eraw when Mraw < 2
Mnorm = Mraw >> 1, Enorm = Eraw + 1 when Mraw >= 2
The hardware therefore uses an XOR gate for the sign, exponent arithmetic for the biased exponent, a significand multiplier, and normalization selection for the significand path.
Special-value classification is handled separately from this normal finite datapath.
A normal floating-point significand is represented in the form:
1.xxxxx × 2^E
Normalization shifts the significand and adjusts the exponent in the opposite direction so the numerical value is preserved.
Significand too large -> Shift Right -> Increment Exponent
Leading zeros -> Shift Left -> Decrement Exponent
Example:
10.10 × 2^3 -> 1.010 × 2^4
In hardware, a leading-one/leading-zero detector determines the required shift amount, a barrel shifter moves the significand, and exponent logic applies the matching correction.
Extra low-order information is retained before the final significand width is selected:
Retained Bits | Guard(G) | Round(R) | Remaining Bits -> OR -> Sticky(S)
For round-to-nearest, ties-to-even, let LSB be the least-significant retained bit. The rounding decision is:
RoundUp = G · (R + S + LSB)
Here, + inside (R + S + LSB) is Boolean OR. If RoundUp = 1, increment the retained significand by one unit in the last retained place (ULP).
This equation covers both cases:
LSB = 1, making the retained result even.If rounding generates a carry beyond the normalized significand width, the significand is shifted right and the exponent is incremented.
Important floating-point exception classes include:
| Exception | Meaning |
|---|---|
| Invalid | Operation has no valid numeric result |
| Divide-by-Zero | Finite nonzero value divided by zero |
| Overflow | Result magnitude is too large |
| Underflow | Result becomes extremely small |
| Inexact | Rounded result differs from the exact mathematical value |
A complete IEEE-754 FPU implementation is outside this Quick Guide; the focus is on the datapath flow and classification behavior.
| Fixed Point | Floating Point |
|---|---|
| Fixed binary-point position | Exponent changes scale |
| Typically lower arithmetic hardware complexity | Typically higher arithmetic hardware complexity |
| Limited dynamic range | Wide dynamic range |
| Predictable resolution | Precision varies with magnitude |
| Suitable for known bounded ranges | Suitable for values spanning a wide range |
Fixed point is attractive when range and required resolution are known in advance and hardware efficiency matters. Floating point is useful when large dynamic range is more important than minimum arithmetic complexity.