Code

Imported upstream version 1.4~rc2.
[pkg-rrdtool.git] / doc / bin_dec_hex.1
index fdecfa3c6de8cdc4c9a0e66efa67e4e22e22b3ba..f6aef5be917be0ddf121fa7591e19d043bacbc20 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" 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
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    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 (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "BIN_DEC_HEX 1"
-.TH BIN_DEC_HEX 1 "2009-02-21" "1.3.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
+.TH BIN_DEC_HEX 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 bin_dec_hex \- How to use binary, decimal, and hexadecimal notation.
 .SH "DESCRIPTION"
@@ -141,7 +142,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 10
+.Vb 14
 \&     0
 \&     1
 \&     2
@@ -178,7 +179,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 10
+.Vb 14
 \&     0
 \&     1
 \&    10
@@ -245,7 +246,9 @@ 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
@@ -354,7 +357,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
-\&\f(CW%1010\fR would be
+%1010 would be
 .PP
 .Vb 4
 \& 1 * 2^3
@@ -410,8 +413,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'029 / 16 is 2'564 with a remainder of 5. Write down 5.
+\& 2'564 / 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
@@ -429,7 +432,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 10
+.Vb 16
 \& 41029 / 2 = 20514 remainder 1
 \& 20514 / 2 = 10257 remainder 0
 \& 10257 / 2 =  5128 remainder 1
@@ -472,7 +475,9 @@ 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