Difference between revisions of "Manuals/calci/HEX2OCT"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''HEX2OCT'''(SomeNumber, NumberPlaces) where, '''SomeNumber''' - is the hexadecimal number. '''NumberPlac...") |
|||
| Line 1: | Line 1: | ||
| − | + | =HEX2OCT(number,places)= | |
| − | ''' | + | *Where 'number' is a hexadecimal number to be converted and |
| + | *'places' is the number of characters to be used to display the output. | ||
| − | + | HEX2OCT converts a hexadecimal number to its octal equivalent. | |
| − | + | == Description == | |
| − | + | HEX2OCT(number,places) | |
| − | + | For Example, | |
| − | |||
| − | |||
| − | + | HEX2OCT("A",4) ''returns '0012' | |
| − | + | HEX2OCT("") ''returns '' | |
| − | |||
| − | |||
| − | + | HEX2OCT("") ''returns '' | |
| − | |||
| − | + | *'number' must be a hexadecimal number. Hexadecimal number uses digits 0 to 9 and characters A to F. The number can also be entered in text format (e.g "1F"). | |
| − | + | *The most significant bit represents the 'sign' of the number. Negative numbers are represented using 2's complement notation. | |
| − | + | *A number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers. | |
| − | |||
| − | |||
| − | + | *Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits). | |
| + | <font color = red> Need to verify the 'limit for no. of input digits' after next release </font> | ||
| − | + | *If 'number' is negative, Calci ignores the places and displays 10 digit octal output. | |
| − | + | *If 'places' is not an integer, it is truncated. | |
| − | |||
| − | |||
| − | + | *If 'places' are non-numeric, Calci returns an #ERROR message. | |
| − | + | *If 'places' is negative, Calci ignores the places and displays the octal output. | |
| − | + | == Examples == | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
| − | | class=" " | | + | | class=" " | '''HEX Input''' |
| − | | | + | | class=" " | '''Octal Output''' |
| − | + | ||
| − | | | ||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | | class=" " | | + | | class="sshl_f" | |
| − | | class="sshl_f" | | + | | class="sshl_f" | |
| − | + | ||
| − | |||
| − | |||
|- class="even" | |- class="even" | ||
| − | | class=" | + | | class="ssh1_f" | |
| − | | class="sshl_f" | | + | | class="sshl_f" | |
| − | + | ||
| − | |||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | + | | class="ssh1_f" | | |
| − | + | | class="sshl_f" | | |
| − | + | ||
| − | | class=" " | | ||
| − | | class=" " | | ||
| − | |||
|- class="even" | |- class="even" | ||
| − | + | | class="ssh1_f" | | |
| − | + | | class="sshl_f" | | |
| − | + | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | class=" " | | ||
| − | | class=" " | | ||
| − | |||
| − | |||
|} | |} | ||
| − | + | == See Also == | |
| − | + | ||
| + | *[[Manuals/calci/OCT2HEX| OCT2HEX]] | ||
| + | |||
| + | *[[Manuals/calci/HEX2BIN| HEX2BIN]] | ||
| + | |||
| + | *[[Manuals/calci/HEX2DEC| HEX2DEC]] | ||
| + | |||
| + | ==References== | ||
| + | |||
| + | *[http://simple.wikipedia.org/wiki/Hexadecimal_numeral_system Hexadecimal Numeral System] | ||
| + | *[http://simple.wikipedia.org/wiki/Octal_numeral_system#Octal_and_hexadecimal Octal and Hexadecimal Numbers] | ||
Revision as of 16:20, 4 December 2013
HEX2OCT(number,places)
- Where 'number' is a hexadecimal number to be converted and
- 'places' is the number of characters to be used to display the output.
HEX2OCT converts a hexadecimal number to its octal equivalent.
Description
HEX2OCT(number,places)
For Example,
HEX2OCT("A",4) returns '0012'
HEX2OCT("") returns
HEX2OCT("") returns
- 'number' must be a hexadecimal number. Hexadecimal number uses digits 0 to 9 and characters A to F. The number can also be entered in text format (e.g "1F").
- The most significant bit represents the 'sign' of the number. Negative numbers are represented using 2's complement notation.
- A number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers.
- Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
Need to verify the 'limit for no. of input digits' after next release
- If 'number' is negative, Calci ignores the places and displays 10 digit octal output.
- If 'places' is not an integer, it is truncated.
- If 'places' are non-numeric, Calci returns an #ERROR message.
- If 'places' is negative, Calci ignores the places and displays the octal output.
Examples
| HEX Input | Octal Output |