MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: List in base 16


toHex = Characters["0123456789ABCDEF"][[# + 1]] &;
hexDigits = toHex /@ IntegerDigits[#, 16] &;
hexString = StringJoin @@ hexDigits@# &;

BaseForm[Prime[100], 16]
hexDigits[Prime[100]]
hexString@Prime@100

Bobby

On Mon, 24 Mar 2003 04:28:40 -0500 (EST), Steve Gray <stevebg at adelphia.net> 
wrote:

> 	BaseForm uses lower case letters and prints the subscript 16
> after each number. Is there a way to print a list whose elements are
> integers 0 through 15 using 0,1,...,9,A,B,C,D,E,F without the
> subscript 16? E.g. {8,13,11,3} should appear as {8,D,B,3}.
> 	Help will be appreciated. Thank you.
>
>
>



-- 
majort at cox-internet.com
Bobby R. Treat



  • Prev by Date: Re: Plot a recurrence relation
  • Next by Date: DSolve and N do not commute
  • Previous by thread: List in base 16
  • Next by thread: Re: List in base 16