X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Fbin_dec_hex.1;h=2a8c49b3ad2296b4d8e4896bc96faa536d65337b;hb=HEAD;hp=c4936decd9a93d65f8d07601e1be243bf9c5c28c;hpb=333ab21495916a8d1c4a2861ef3fe86763fde684;p=pkg-rrdtool.git diff --git a/doc/bin_dec_hex.1 b/doc/bin_dec_hex.1 index c4936de..2a8c49b 100644 --- a/doc/bin_dec_hex.1 +++ b/doc/bin_dec_hex.1 @@ -1,15 +1,7 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp @@ -48,22 +40,25 @@ . ds R" '' 'br\} .\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" .\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.if \nF \{\ +.ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na +.el \{\ +. de IX +.. +.\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -129,7 +124,11 @@ .\" ======================================================================== .\" .IX Title "BIN_DEC_HEX 1" -.TH BIN_DEC_HEX 1 "2009-02-21" "1.3.7" "rrdtool" +.TH BIN_DEC_HEX 1 "2013-05-23" "1.4.8" "rrdtool" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh .SH "NAME" bin_dec_hex \- How to use binary, decimal, and hexadecimal notation. .SH "DESCRIPTION" @@ -142,7 +141,7 @@ it is not the first one. .PP If this sounds cryptic to you, this is what I've just said in numbers: .PP -.Vb 14 +.Vb 10 \& 0 \& 1 \& 2 @@ -179,7 +178,7 @@ digits. They only use two different symbols, namely \*(L"0\*(R" and \*(L"1\*(R". the same rules to this set of digits and you get the binary numbering system: .PP -.Vb 14 +.Vb 10 \& 0 \& 1 \& 10 @@ -246,9 +245,7 @@ representations, but with eight different symbols. \& Octal (8) \& Decimal (10) \& Hexadecimal (16) -.Ve -.PP -.Vb 23 +\& \& (2) (8) (10) (16) \& 00000 0 0 0 \& 00001 1 1 1 @@ -357,7 +354,7 @@ It is the same in all other representations: This example can not be done for binary as that system only uses two symbols. Another example: .PP -%1010 would be +\&\f(CW%1010\fR would be .PP .Vb 4 \& 1 * 2^3 @@ -413,8 +410,8 @@ The other method builds up the number from the right. Let's try 41'029 again. Divide by 16 and do not use fractions (only whole numbers). .PP .Vb 4 -\& 41\(aq029 / 16 is 2\(aq564 with a remainder of 5. Write down 5. -\& 2\(aq564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. +\& 41\*(Aq029 / 16 is 2\*(Aq564 with a remainder of 5. Write down 5. +\& 2\*(Aq564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. \& 160 / 16 is 10 with no remainder. Prepend 45 with 0. \& 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045. .Ve @@ -432,7 +429,7 @@ has the advantage that you can see very easily if you should write down a zero or a one: if you divide by two the remainder will be zero if it is an even number and one if it is an odd number: .PP -.Vb 16 +.Vb 10 \& 41029 / 2 = 20514 remainder 1 \& 20514 / 2 = 10257 remainder 0 \& 10257 / 2 = 5128 remainder 1 @@ -475,9 +472,7 @@ Group \f(CW%1010000001000101\fR by three and convert into octal: \& %1 010 000 001 000 101 \& %001 010 000 001 000 101 \& 1 2 0 1 0 5 \-\-> 0120105 -.Ve -.PP -.Vb 3 +\& \& So: %1010000001000101 = 0120105 = 0xA045 = 41029 \& Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029(10) \& Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029