A data processing apparatus and method for converting a number between
fixed-point and floating-point representations. More particularly, the
data processing apparatus includes a data processing unit operable to
execute instructions, with the data processing unit being responsive to a
format conversion instruction to apply a format conversion operation to a
number to perform a conversion between the fixed-point representation of
the number and the floating-point representation of the number.
Furthermore, a control field is provided which is arranged to provide a
programmable value specifying a decimal point location within the
fixed-point representation of the number, and the data processing unit is
operable to reference the control field and to control the formal
conversion operation in accordance with the programmable value. This
enables a single instruction to be used to directly convert between
fixed-point formats (where the position of the decimal point may be
programmable varied) and floating-point representations.