diff --git a/doc/bin_dec_hex.1 b/doc/bin_dec_hex.1
index dd06561ce4b791753211656fc9d077bc8aa9e9ad..fdecfa3c6de8cdc4c9a0e66efa67e4e22e22b3ba 100644 (file)
--- a/doc/bin_dec_hex.1
+++ b/doc/bin_dec_hex.1
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
.\"
.\" 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
. 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.
.\" ========================================================================
.\"
.IX Title "BIN_DEC_HEX 1"
-.TH BIN_DEC_HEX 1 "2008-03-15" "1.3.0" "rrdtool"
+.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
.SH "NAME"
bin_dec_hex \- How to use binary, decimal, and hexadecimal notation.
.SH "DESCRIPTION"
.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
\& Octal (8)
\& Decimal (10)
\& Hexadecimal (16)
-.Ve
-.PP
-.Vb 23
+\&
\& (2) (8) (10) (16)
\& 00000 0 0 0
\& 00001 1 1 1
Pascal, \*(L"#\*(R" for \s-1HTML\s0. It is common to assume that if a number starts
with a zero, it is octal. It does not matter what is used as long as
you know what it is. I will use \*(L"0x\*(R" for hexadecimal, \*(L"%\*(R" for binary
-and \*(L"0\*(R" for octal. The following numbers are all the same, just their represenatation (base) is different: 021 0x11 17 \f(CW%00010001\fR
+and \*(L"0\*(R" for octal. The following numbers are all the same, just their
+representation (base) is different: 021 0x11 17 \f(CW%00010001\fR
.PP
To do arithmetics and conversions you need to understand one more thing.
It is something you already know but perhaps you do not \*(L"see\*(R" it yet:
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
(which is just plain 16) four times and write down \*(L"4\*(R" to get 0xA04?.
Subtract 64 from 69 (69 \- 4*16) and the last digit is 5 \-\-> 0xA045.
.PP
-The other method builds ub the number from the right. Let's try 41'029
+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
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
\& %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
basic questions. They will not only get their answer, but at the same
time learn a whole lot more.
.PP
-Alex van den Bogaerdt <alex@ergens.op.het.net>
+Alex van den Bogaerdt <alex@vandenbogaerdt.nl>