Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: List in base 16

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40168] Re: List in base 16
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Tue, 25 Mar 2003 03:01:43 -0500 (EST)
  • References: <b5mj8t$s0l$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

toHex[n_]:=IntegerDigits[n,16] /.
    x_/;x>9:>FromCharacterCode[x+55]

FromDigits[{8,13,11,3},16]

36275

toHex[%]

{8,D,B,3}


Bob Hanlon
In article <b5mj8t$s0l$1 at smc.vnet.net>, Steve Gray <stevebg at adelphia.net>
wrote:

<< Subject:	List in base 16
From:		Steve Gray <stevebg at adelphia.net>
To: mathgroup at smc.vnet.net
Date:		Mon, 24 Mar 2003 09:31:09 +0000 (UTC)

	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}. >><BR><BR>


  • Prev by Date: Cell grouping rules
  • Next by Date: Ellipse Drawing
  • Previous by thread: Re: List in base 16
  • Next by thread: RE: List in base 16