Difference between revisions of "Manuals/calci/OCT2HEX"
Jump to navigation
Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="8SpaceContent" align="left"><div class="ZEditBox" align=...") |
|||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | =OCT2HEX(number, places)= | |
| − | + | *Where <math>number</math> is an octal number to be converted and | |
| + | *<math>places</math> is the number of characters to be used to display the output. | ||
| − | + | OCT2HEX() converts an octal number to its hexadecimal equivalent. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | == Description == | |
| + | OCT2HEX(number, places) | ||
| − | + | For Example, | |
| − | |||
| − | |||
| − | + | OCT2HEX(300,4) ''returns 00C0'' | |
| − | + | OCT2HEX(23,5.5) ''returns 000013'' | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | OCT2HEX(777,3) ''returns 1FF'' | |
| − | < | + | *The <math>number</math> can be upto 9 digits. The most significant bit is the sign bit and remaining bits are magnitude bits. |
| + | *If the <math>number</math> is negative, Calci ignores the places and returns a 7 digit hexadecimal number. | ||
| + | *If the <math>number</math> is not an integer, Calci displays an #NUM! error message. | ||
| + | *If the <math>number</math> is an invalid octal number, Calci displays an #NUM! error message. | ||
| + | *<math>places</math> argument can be omitted. Calci displays the hexadecimal output with minimum number of characters necessary. | ||
| + | *<math>places</math> is used for padding the output with leading '0's'. | ||
| + | *Calci ignores the <math>places</math>, if the output is more than mentioned 'places'. | ||
| + | *If <math>places</math> is non-numeric or negative, Calci displays an error message. | ||
| + | *If <math>places</math> is not an integer, Calci truncates the 'places' value. | ||
| + | *A number preceding with '0' (e.g. 0377) should be written in text format ("0377") to avoid confusion with hexadecimal numbers. | ||
| − | + | == Examples == | |
| − | |||
| − | |||
| − | + | <div id="1SpaceContent" class="zcontent" align="left"> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | <div id=" | ||
{| id="TABLE1" class="SpreadSheet blue" | {| id="TABLE1" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
| − | | class=" " | | + | | class=" " | '''Function''' |
| − | | | + | | class=" " | '''HEX Output''' |
| − | + | ||
| − | | | ||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | | class=" " | | + | | class="sshl_f" | OCT2HEX(511) |
| − | | class="sshl_f" | | + | | class="sshl_f" | 0000149 |
| − | + | ||
| − | |||
| − | |||
|- class="even" | |- class="even" | ||
| − | | class=" | + | | class="sshl_f" | OCT2HEX(433,3) |
| − | | class=" | + | | class="sshl_f" | 11B |
| − | + | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | | class=" " | | + | | class="sshl_f" | OCT2HEX(777777777) |
| − | + | | class="sshl_f" | 7FFFFFF | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | class=" " | | ||
|} | |} | ||
| − | + | ==Related Videos== | |
| − | + | ||
| + | {{#ev:youtube|t3Wn-mjT-DM|280|center|OCT2HEX}} | ||
| + | |||
| + | == See Also == | ||
| + | |||
| + | *[[Manuals/calci/HEX2OCT| HEX2OCT]] | ||
| + | |||
| + | *[[Manuals/calci/BIN2HEX| BIN2HEX]] | ||
| + | |||
| + | *[[Manuals/calci/DEC2HEX| DEC2HEX]] | ||
| + | |||
| + | ==References== | ||
| + | |||
| + | *[http://en.wikipedia.org/wiki/Octal#Octal_to_hexadecimal_conversion Octal to Hexadecimal Conversion] | ||
Latest revision as of 15:18, 27 April 2015
OCT2HEX(number, places)
- Where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} is an octal number to be converted and
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} is the number of characters to be used to display the output.
OCT2HEX() converts an octal number to its hexadecimal equivalent.
Description
OCT2HEX(number, places)
For Example,
OCT2HEX(300,4) returns 00C0
OCT2HEX(23,5.5) returns 000013
OCT2HEX(777,3) returns 1FF
- The Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} can be upto 9 digits. The most significant bit is the sign bit and remaining bits are magnitude bits.
- If the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} is negative, Calci ignores the places and returns a 7 digit hexadecimal number.
- If the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} is not an integer, Calci displays an #NUM! error message.
- If the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} is an invalid octal number, Calci displays an #NUM! error message.
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} argument can be omitted. Calci displays the hexadecimal output with minimum number of characters necessary.
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} is used for padding the output with leading '0's'.
- Calci ignores the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} , if the output is more than mentioned 'places'.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} is non-numeric or negative, Calci displays an error message.
- If is not an integer, Calci truncates the 'places' value.
- A number preceding with '0' (e.g. 0377) should be written in text format ("0377") to avoid confusion with hexadecimal numbers.
Examples
| Function | HEX Output |
| OCT2HEX(511) | 0000149 |
| OCT2HEX(433,3) | 11B |
| OCT2HEX(777777777) | 7FFFFFF |