> >Try using hexadecimal (base 16) - it makes life much easier:
> >
> >Take each set of 4 bits (binary digits) and convert to a number in range
> >0-15, then substitute A-F for 10-15.
If you can't handle 0-15 in a single digit, you could always try octal
(base 8) which uses 3 bits per digit, converting to a number in the
range 0-7. (The main problem with this is that I don't know of any
convention for indicating an octal number. The C format is to preceed
the number by a zero (0). Personally, I prefer hex' as it works in
nybbles.) eg:
1110 1100 1001 0010 -> 1 110 110 010 010 010 => 1 6 6 2 2 2 => 0166222
As you can see, the problem with octal is that 16 is not divisible by 3,
but it does mean, like hex', that converting to/from binary is easy.
The (minor) advantage is that the last 2 octal digits of a word are
often used by the 68k series for an addressing mode, with the preceeding
2 bits indicating the size.
Robert