% ----------------------------------------------------------------------

\chapter[Hexadecimal notation, et al.]{Hexadecimal and other notational matters}
\label{hex}
\index{convention}

The importance of conventional mathematical notation is hard to
overstate.  Such notation serves two distinct purposes: it conveys
mathematical ideas from writer to reader; and it concisely summarizes
complex ideas on paper to the writer himself.  Without the notation, one
would find it difficult even to think clearly about the mathematics; to
discuss it with others, nearly impossible.

The right notation is not always conveniently found at hand, of course.
The discoverer of a new mathematical idea may require new notation to
represent it.  Even the user of an old mathematical idea may find that
its old notation no longer suits.

Regarding the last problem:  old notation is conventional, and
convention is---and ought to be---a steep hill to climb.
Indeed, mathematics already enjoys excellent conventional notation, worn
like an old boot to fit the collected experience of the centuries.
% diagn: the next sentence, revised, wants another reading
Nevertheless, slavish devotion to convention does not serve
the mathematical literature well; for how else shall notation be made
to better fit the coming experience future mathematicians may gain, if
writers will not incrementally improve the notation today?
Consider the notation of the algebraist Girolamo Cardan in his 1539
letter to Tartaglia:
\begin{quote}
  [T]he cube of one-third of the coefficient of the unknown is
  greater in value than the square of one-half of the
  number.~\cite{mathbios}
\end{quote}
If Cardan lived today, surely he would express the same thought in the
form
\[
  \left(\frac{a}{3}\right)^3 > \left(\frac{x}{2}\right)^2.
\]
Good notation matters.

\index{$\pi$}
\index{$2\pi$}
Although this book has neither brief nor wish to overhaul applied
mathematical notation generally, the book does seek to aid the
honorable cause of notational evolution in a few specifics.  For
example, the book
sometimes treats~$2\pi$ implicitly as a single symbol, so that (for
instance) the quarter revolution or right angle is expressed as $2\pi/4$
rather than as the less evocative $\pi/2$.

As a single symbol, of course,~$2\pi$ remains a bit awkward.  One wants
to introduce some new symbol%
\footnote{%
  See~\cite{Palais:2001} and~\cite{Bartholomew}.  There also exists
  online a spirited ``Tau manifesto'' of which you may have heard,
  though your author does not feel quite risqu\'e enough to
  \emph{formally} cite a ``manifesto'' as a mathematical source!%
}
$\xi=2\pi$, $\tau=2\pi$ or even $\palais=2\pi$.  However, having
already stretched to reach the more substantive \S~\ref{hex:240.1},
caution here prevails.  In this book, the style~$2\pi$ is
retained, even if the author would prefer it to fall obsolete.%

% ----------------------------------------------------------------------

\section{Hexadecimal numerals}
\label{hex:240.1}
\index{hexadecimal}
\index{$\mbox{0x}$}

Treating~$2\pi$ sometimes as a single symbol is a small step, unlikely
to trouble readers much.  A bolder step is to adopt from the
computer-science literature the important notational improvement of the
hexadecimal numeral.  No incremental step is possible here; either we
leap the ditch or we remain on the wrong side.  In this book, we choose
to leap.

Traditional decimal notation seems unobjectionable for measured quantities
like 63.7~miles, $\$1.32$ million or $9.81\:\mr{m}/\mr{s}^2$, but its
iterative tenfold structure meets little or no aesthetic support in
mathematical theory.  Consider for instance the decimal numeral 127,
whose number suggests a significant idea to the computer scientist, but
whose decimal notation does nothing to convey the notion of the largest
signed integer storable in a byte.  Much better is the base-sixteen
hexadecimal notation 0x7F, which clearly expresses the idea of $2^7-1$.
To the reader who is not a computer scientist, the aesthetic advantage
may not seem immediately clear from the one example, but consider the
decimal numeral 2,147,483,647, which represents the largest signed integer
storable in a standard thirty-two bit word.  In hexadecimal notation,
this is $\mr{0x7FFF\,FFFF}$, or in other words $2^{\mr{0x1F}}-1$.  The
question is: which notation more clearly captures the idea?

By contrast, decimal notation like 499,999 does not really convey any
interesting \emph{mathematical} idea at all, except with regard to a
special focus on tens---a focus which is of immense practical use but
which otherwise tells one very little about numbers, as numbers.
Indeed, one might go so far as to say that the notation 499,999 were
misleading, insofar as it attaches mathematically false interest to the
idea it represents.

Now, one does not wish to sell the hexadecimal numeral too hard.
Decimal numerals are fine:  the author uses them as often, and likes
them as well, as almost anyone does.  Nevertheless, the author had a
choice when writing this book, and for \emph{this} book the hexadecimal
numeral seemed the proper, conceptually elegant choice---proper and
conceptually elegant enough indeed to risk deviating this far from
convention---so that is the numeral he chose.

To readers unfamiliar with the hexadecimal notation, to explain very
briefly: hexadecimal represents numbers not in tens but rather in
sixteens.  The rightmost place in a hexadecimal numeral represents ones;
the next place leftward, sixteens; the next place leftward, sixteens
squared; the next, sixteens cubed, and so on.  For instance, the
hexadecimal numeral 0x1357 means ``seven, plus five times sixteen, plus
thrice sixteen times sixteen, plus once sixteen times sixteen times
sixteen'' (all of which totals to 4951 in decimal).  In hexadecimal, the
sixteen symbols 0123456789ABCDEF respectively represent the numbers zero
through fifteen, with sixteen being written 0x10.

All this raises the sensible question: why sixteen?%
\footnote{
  An alternative~\cite[book~6, no.~83]{Laplace-Ouvres}
  advocated by some nineteenth-century
  writers was twelve.  (Laplace, cited, was not indeed one of the
  advocates, or at any rate was not a strong advocate; however, his
  context appears to have lain in the promotion of base twelve by
  contemporaries.)  In base twelve, one quarter, one third and one half
  are respectively written 0.3, 0.4 and 0.6.  Also, the hour angles
  (\S~\ref{trig:260}) come in neat increments of $(0.06)(2\pi)$ in base
  twelve, so there are some real advantages to that base.  Hexadecimal,
  however, besides having momentum from the computer-science literature,
  is preferred for its straightforward proxy of binary.
}
The answer is that sixteen is~$2^4$, so hexadecimal (base sixteen) is
found to offer a convenient shorthand for binary (base two, the
fundamental, smallest possible base).  Each of the sixteen hexadecimal
digits represents a unique sequence of exactly four bits (binary
digits).  Binary is inherently theoretically interesting, but direct
binary notation is unwieldy (the hexadecimal numeral 0x1357 is binary
$\mr{0001\,0011\,0101\,0111}$), so hexadecimal is written in proxy.

Admittedly, the hexadecimal~``0x'' notation is bulky and overloads the
letters~A through~F (letters which otherwise conventionally often
represent matrices or indeterminate coefficients).  However, the greater
trouble with the hexadecimal notation is not in the notation itself but
rather in the unfamiliarity with it.  The reason it is unfamiliar is
that it is not often encountered outside the computer-science
literature, but it is not encountered because it is not used, and it is
not used because it is not familiar, and so on in a cycle.  It seems
to this writer, on aesthetic grounds, that this particular cycle is
worth breaking, so the book you are reading employs the hexadecimal system
for integers larger than~9.  If you have never yet used the hexadecimal
system, it is worth your while to learn it.  For the sake of conceptual
elegance, at the risk of transgressing entrenched convention, this book
employs hexadecimal throughout.

The book occasionally omits the cumbersome hexadecimal prefix~``0x,''
as for example when it arrays hexadecimal numerals in matrices (as in
\S~\ref{gjrank:341.01} where~A is ten but, unfortunately potentially
confusingly,~$A$, set in italics, is a matrix; and as in
Fig.~\ref{drvtv:pasc}).
% diagn: check that the references of the above paragraph are not later lost!

\index{measure, unit of}
\index{unit!of measure}
\index{physical unit}
\index{unit!physical}
The book seldom mentions numbers with physical units of measure
attached but, when it does, it expresses those in decimal rather than
hexadecimal no\-ta\-tion---for example, $v_\mr{sound}=331\:\mr{m/s}$
rather than $v_\mr{sound}=\mr{0x14B}\:\mr{m/s}$.

Combining the hexadecimal and~$2\pi$ ideas, we note here
for interest's sake that
\[
  2\pi \approx \mr{0x6.487F}.
\]
%(The author does not know whether or where, deep in the hexadecimal
%digits of~$2\pi$, a sequence like $55555555$ appears but, if and where
%it did, it would strike him as potentially rather more interesting than
%some sequence $55555555$ deep in the \emph{decimal} digits.)

% ----------------------------------------------------------------------

\section{Avoiding notational clutter}
\label{hex:270.2}
\index{clutter, notational}

Good applied mathematical notation is not cluttered.  Good notation does
not necessarily include every possible limit, qualification, superscript
and subscript.  For example, the sum
\[
  S = \sum_{i=1}^{M}\sum_{j=1}^{N} a_{ij}^2
\]
might be written less thoroughly but more readably as
\[
  S = \sum_{i,j} a_{ij}^2
\]
if the meaning of the latter were clear from the context.

When to omit subscripts and such is naturally a matter of style and
subjective judgment, but in practice such judgment is often not hard to
render.  The balance is between showing few enough symbols that the
interesting parts of an equation are not obscured visually in a tangle
and a haze of redundant little letters, strokes and squiggles, on the
one hand; and on the other hand showing enough detail that the reader
who opens the book directly to the page has a fair chance to understand
what is printed there without studying the whole book carefully up to
that point.  Where appropriate, this book often condenses notation and
omits redundant symbols.

