diff options
| -rw-r--r-- | doc/numconvert.1.in | 83 |
1 files changed, 72 insertions, 11 deletions
diff --git a/doc/numconvert.1.in b/doc/numconvert.1.in index 160115a..03a4135 100644 --- a/doc/numconvert.1.in +++ b/doc/numconvert.1.in | |||
| @@ -37,20 +37,31 @@ | |||
| 37 | .SH NAME | 37 | .SH NAME |
| 38 | numconvert \- displays values using multiple numeral systems | 38 | numconvert \- displays values using multiple numeral systems |
| 39 | .SH SYNOPSIS | 39 | .SH SYNOPSIS |
| 40 | \fBnumconvert\fR [\fB-BbDdlOoRrsXx\fR] [\fInumber1 number2 ... numberN\fR] | 40 | \fBnumconvert\fR [\fB-a\fR | \fB-b\fR | \fB-d\fR \fB | \fB-o\fR | \fB-x\fR] [\fB-ABDlOqRrsX\fR] [\fB-f\fR \fIorder\fR] \fInumber1\fR [\fInumber2\fR [\fInumberN\fR]] |
| 41 | .sp | 41 | .sp |
| 42 | \fBnumconvert\fR [\fB--help\fR | \fB-h\fR] [\fB--version\fR | \fB-V\fR] | 42 | \fBnumconvert\fR [\fB--help\fR | \fB-h\fR] |
| 43 | .sp | ||
| 44 | \fBnumconvert\fR [\fB--version\fR | \fB-V\fR] | ||
| 43 | 45 | ||
| 44 | .SH DESCRIPTION | 46 | .SH DESCRIPTION |
| 45 | The \fBnumconvert\fR utility is a filter which displays numbers using different | 47 | The \fBnumconvert\fR utility converts values between numeral systems. |
| 46 | numeral systems. Input strings which are prefixed with \fI0x\fR are assumed to be | 48 | \fBnumconvert\fR uses prefiexes to determine the input notation of a value if |
| 47 | hexidecimal numerals. Input strings which are prefixed with a single `\fI0\fR' | 49 | an input notation option is not specified. Strings with the prefix \fI0x\fR |
| 48 | character are assumed to be octal numerals. Input strings which are prefixed with | 50 | are treated as hexadecimal input; \fI00\fR and \fI0b\fR as binary input; and |
| 49 | `\fI00\fR' are assumed to be binary numerals. All other strings are assumed | 51 | \fI0\fR followed by a non-zero numeric character as octal input. If the input |
| 50 | to be in decimal numerals. | 52 | does not use a known prefix, the input will be treat as decimal if the input |
| 53 | string contains only decimal numerals. If \fBnumconvert\fR is unable to | ||
| 54 | determine the numeral system of the input, the input will be treated as an | ||
| 55 | ASCII string. | ||
| 51 | 56 | ||
| 52 | .SH OPTIONS | 57 | .SH OPTIONS |
| 53 | .TP | 58 | .TP |
| 59 | \fB-A\fR | ||
| 60 | Display the values as an ASCII character | ||
| 61 | .TP | ||
| 62 | \fB-a\fR | ||
| 63 | Process input as individual ASCII characters | ||
| 64 | .TP | ||
| 54 | \fB-B\fR | 65 | \fB-B\fR |
| 55 | Display the values as binary numerals. | 66 | Display the values as binary numerals. |
| 56 | .TP | 67 | .TP |
| @@ -63,11 +74,16 @@ Display the values as decimal numerals. | |||
| 63 | \fB-d\fR | 74 | \fB-d\fR |
| 64 | Process input strings as decimal numerals. | 75 | Process input strings as decimal numerals. |
| 65 | .TP | 76 | .TP |
| 77 | \fB-f\fR \fIorder\fR | ||
| 78 | Set order of output values if specifing multiple formats. Use '\fIa\fR' for | ||
| 79 | ASCII; '\fIb\fR' for binary; '\fId\fR' for decimal; '\fIo\fR' for octal; | ||
| 80 | and '\fIx\fR' for hexadecimal. The default order is '\fIabxod\fR'. | ||
| 81 | .TP | ||
| 66 | \fB\-h\fR, \fB--help\fR | 82 | \fB\-h\fR, \fB--help\fR |
| 67 | Displays usage information and exits. | 83 | Displays usage information and exits. |
| 68 | .TP | 84 | .TP |
| 69 | \fB-l\fR | 85 | \fB-l\fR |
| 70 | Display hexadecimal and binary numerals using the least amount of digits possible. | 86 | Display values with padding for maximum values instead of assuming 32 bit values. |
| 71 | .TP | 87 | .TP |
| 72 | \fB-O\fR | 88 | \fB-O\fR |
| 73 | Display the values as octal numerals. | 89 | Display the values as octal numerals. |
| @@ -75,6 +91,9 @@ Display the values as octal numerals. | |||
| 75 | \fB-o\fR | 91 | \fB-o\fR |
| 76 | Process input strings as octal numerals. | 92 | Process input strings as octal numerals. |
| 77 | .TP | 93 | .TP |
| 94 | \fB-q\fR | ||
| 95 | Suppress column names in output. | ||
| 96 | .TP | ||
| 78 | \fB-R\fR | 97 | \fB-R\fR |
| 79 | Display binary numerals in little endian byte order. | 98 | Display binary numerals in little endian byte order. |
| 80 | .TP | 99 | .TP |
| @@ -93,11 +112,53 @@ Display the values as hexadecimal numerals. | |||
| 93 | \fB-x\fR | 112 | \fB-x\fR |
| 94 | Process input strings as hexadecimal numerals. | 113 | Process input strings as hexadecimal numerals. |
| 95 | 114 | ||
| 115 | .SH EXAMPLES | ||
| 116 | The following example converts values to ASCII, binary, hexadecimal, | ||
| 117 | and decimal: | ||
| 118 | .sp | ||
| 119 | .RS | ||
| 120 | numconvert -A -B -X -D 0001000001 0102 67 | ||
| 121 | .br | ||
| 122 | TXT, Binary, Hex, Decimal | ||
| 123 | .br | ||
| 124 | \'A\', 00000000 00000000 00000000 01000001, 0x00000041, 65 | ||
| 125 | .br | ||
| 126 | \'B\', 00000000 00000000 00000000 01000010, 0x00000042, 66 | ||
| 127 | .br | ||
| 128 | \'C\', 00000000 00000000 00000000 01000011, 0x00000043, 67 | ||
| 129 | .RE | ||
| 130 | |||
| 131 | The following example inteprets the input as decimal and displays the values | ||
| 132 | as binary, hexadecimal, and decimal: | ||
| 133 | .RS | ||
| 134 | numconvert -d -B -X -D 0001000001 0102 67 | ||
| 135 | .br | ||
| 136 | Binary, Hex, Decimal | ||
| 137 | .br | ||
| 138 | 00000000 00001111 01000010 01000001, 0x000F4241, 1000001 | ||
| 139 | .br | ||
| 140 | 00000000 00000000 00000000 01100110, 0x00000066, 102 | ||
| 141 | .br | ||
| 142 | 00000000 00000000 00000000 01000011, 0x00000043, 67 | ||
| 143 | .RE | ||
| 144 | |||
| 145 | The following example changes the order of the output: | ||
| 146 | .RS | ||
| 147 | numconvert -d -B -X -D -f \'dxb\' 0001000001 0102 67 | ||
| 148 | .br | ||
| 149 | Decimal, Hex, Binary | ||
| 150 | .br | ||
| 151 | 1000001, 0x000F4241, 00000000 00001111 01000010 01000001 | ||
| 152 | .br | ||
| 153 | 102, 0x00000066, 00000000 00000000 00000000 01100110 | ||
| 154 | .br | ||
| 155 | 67, 0x00000043, 00000000 00000000 00000000 01000011 | ||
| 156 | .RE | ||
| 157 | |||
| 96 | .SH "REPORTING BUGS" | 158 | .SH "REPORTING BUGS" |
| 97 | Report bugs to David M. Syzdek <@PACKAGE_BUGREPORT@>. | 159 | Report bugs to David M. Syzdek <@PACKAGE_BUGREPORT@>. |
| 98 | 160 | ||
| 99 | .SH "SEE ALSO" | 161 | .SH "SEE ALSO" |
| 100 | .BR bitops (1), | 162 | .BR bitops (1), |
| 101 | .BR codetagger (1), | 163 | .BR bindump (1), |
| 102 | .BR numconvert (1) | ||
| 103 | .\" end of man page | 164 | .\" end of man page |
