11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RND Round Accumulator RNDConvergent rounding differs from "standard" rounding in that convergent roundingattempts to remove the aforementioned positive bias by equally distributing the round-<strong>of</strong>ferror. The convergent rounding technique initially performs "standard" rounding as previouslydescribed. Again, the rounding constant depends on the scaling mode being used.Once "standard" rounding has been done, the convergent rounding method tests theresult to determine if all bits Including and to the right <strong>of</strong> the rounding position arezero. If, and only if, this special condition is true, the convergent rounding method willclear the bit immediately to the left <strong>of</strong> the rounding position. When this special conditionis true, numbers which have a "1" in the bit immediately to the left <strong>of</strong> the rounding positionare rounded up; numbers with a "0" in the bit immediately to the left <strong>of</strong> the roundingposition are rounded down. Thus, these numbers are rounded up half the time androunded down the rest <strong>of</strong> the time. Therefore, the round<strong>of</strong>f error averages out to zero.The LS bits <strong>of</strong> the convergently rounded result are then cleared so that the roundedresult may be immediately used by the next instruction.Example:RND A #$123456,X1 B,Y1;round A accumulator into A 1, zero AOBefore ExecutionAfter ExecutionCase I: A 1 .....__$_00_:1_23_4_56_:7_89_AB_C __ AI $00: 123456 :000000Case II: A 1-1__ $0_0:_12_34_5_6:8_0_00_00 __ AI $00:123456:000000Case III: A 1 .....__$0_0:_12_34_5_6:8_0_00_00 __ AI $00:123456:000000Explanation <strong>of</strong> Example: Prior to execution, the 56-bit A accumulator contains thevalue $00:123456:789ABC for Case I, the value $00:123456:800000 for Case II, and thevalue $00:123455:800000 for Case III. The execution <strong>of</strong> the RND A instruction roundsthe value in the A accumulator into the MSP portion <strong>of</strong> the A accumulator (A1), usingconvergent rounding, and then zeros the. LSP portion <strong>of</strong> the A accumulator (AO). Notethat Case II is the special case that distinguishes convergent rounding from standard orbiased rounding.-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!