NLZ: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(New page: {{InstructionBox |Mnemonic=NLZ |Description=Normalize (integer to floating) |Format=NLZ ''<scaling>'' |Code=151 400 |Affected=(T), (A) and (D) }} '''STZ''' is an instruction on the ...)
 
m (Fixing a cut'n'paste error)
Line 7: Line 7:
}}
}}


'''STZ''' 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 accumulator]], using the ''scaling'' of the NLZ instruction as a scaling factor.  


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 ==
== Sources ==

Revision as of 21:17, 31 March 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 accumulator, using the scaling of the NLZ instruction as a scaling factor.

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.

Sources