I find using BaseForm to be a little tricky. For example, if you use BaseForm and then do some additional operation all the numbers turn back into base 10, so you have do BaseForm as the "last step". This creates the problem of how you then format the BaseForm if it is the last step.
For example, given the following:
BaseForm[Grid[Partition[Map[FromDigits[#,16]&,RealDigits[FractionalPart[CubeRoot[Table[Prime[n],{n,64}]]],16,8,-1][[All,1]]],8],Alignment->Right],16]
Formatting problems are:
(1) how to get leading zeroes for those values that are less than 8 hex digits?
(2) how to get rid of the 16's (I don't want to display them)
Please do not answer with copy and paste from the doc center, unless you can you show how the command in question works in the above expression inside of BaseForm. PaddedForm and other similar commands DO NOT WORK as far as I can tell. For example if you write:
BaseForm[Grid[Partition[Map[PaddedForm[FromDigits[#,16],8]&,... etc
It does NOT work.
PaddedForm
to get the leading zero $\endgroup$BaseForm
and putting something like/. {n_Integer :> IntegerString[n, 16, 8]}
at the end? $\endgroup$PaddedForm
does give you padding on the right. Given the name shouldn't we expect that to be the case? I didn;t say you could remove the zeros that way -- was referring solely to the padding part of your question:BaseForm[PaddedForm[#, 8, NumberPadding -> {"0", ""}] & /@ Range[0, 15], 16]
$\endgroup$