NLZ: Difference between revisions

From NDWiki
Jump to navigation Jump to search
m (Fixing a cut'n'paste error)
(Adopt to new format in template, +"ND-110 48-bit floating point CPU")
Line 5: Line 5:
|Code=151 400
|Code=151 400
|Affected=(T), (A) and (D)
|Affected=(T), (A) and (D)
|Arcitecture=[[ND-100]], [[ND-110 CPU|ND-110]]
}}
}}


'''NLZ''' is an instruction on the ND platform. It converts the number in the [[A register]] to a standard form floating number in [[the floating accumulator]], using the ''scaling'' of the NLZ instruction as a scaling factor.  
'''NLZ''' is an instruction on the ND platform. It converts the number in the [[A register]] to a standard form floating number in the [[floating point accumulator]] (A and D registers), using the ''scaling'' of the NLZ instruction as a scaling factor.
 
The ''scaling'' is given to the conversion of -128 to 127 (approximately 10<sup>-39</sup> to 10<sup>39</sup>).


For integers, a scaling factor of +16<sub><small>10</small></sub> will give a floating point number with the same value as the integer. A larger scaling factor will result in a higher floating point number. Because of the single precision fixed point number, the [[D register]] will be cleared.
For integers, a scaling factor of +16<sub><small>10</small></sub> will give a floating point number with the same value as the integer. A larger scaling factor will result in a higher floating point number. Because of the single precision fixed point number, the [[D register]] will be cleared.


== Example ==
== Example ==
*NLZ+20 (''code 151420'') Convert from integer to floating point.
*NLZ+20 (''code 151420'') Convert from integer to floating point.


== Sources ==
 
*{{ND-doc|06.014.02|Page 144 and 240}}
== ND-110 48-bit floating point CPU ==
{{main|48-bit floating point}}
 
The ND-110 can have a 48-bit floating point CPU. In the 48-bit floating point CPU a further register (T) and memory location ([[ea]] + 2) are used. In this case, the [[T register]] is linked to location ea, A to ea + 1 and D to ea + 2.
 
 
== References ==
*{{ND-doc|06.014.02|page 144 and 240}}
*{{ND-doc|06.029.01|page 70 and 72}}


[[Category:ND-100 instructions]]
[[Category:ND-100 instructions]]

Revision as of 05:35, 4 April 2009

NLZ
Description Normalize (integer to floating)
Format NLZ <scaling>
Code 151 4008
Affected (T), (A) and (D)
Type User
Architecture {{{Architecture}}}

NLZ is an instruction on the ND platform. It converts the number in the A register to a standard form floating number in the floating point accumulator (A and D registers), using the scaling of the NLZ instruction as a scaling factor.

The scaling is given to the conversion of -128 to 127 (approximately 10-39 to 1039).

For integers, a scaling factor of +1610 will give a floating point number with the same value as the integer. A larger scaling factor will result in a higher floating point number. Because of the single precision fixed point number, the D register will be cleared.


Example

  • NLZ+20 (code 151420) Convert from integer to floating point.


ND-110 48-bit floating point CPU

Main article: 48-bit floating point

The ND-110 can have a 48-bit floating point CPU. In the 48-bit floating point CPU a further register (T) and memory location (ea + 2) are used. In this case, the T register is linked to location ea, A to ea + 1 and D to ea + 2.


References