r/Mathematica • u/Remarkable_Dot4745 • Mar 07 '26
Hexadecimals
Got side tracked from cybersecurity and have gotten into understanding hexadecimals can someone pls go in depth about my errors specifically w hexadecimal of 34
0
Upvotes



6
u/pfthrowaway5130 Mar 08 '26
I know sometimes people post screenshots of Mathematica code but this is next level!
3
u/veryjewygranola Mar 08 '26
I don't see any errors, 34 is 22 in hex.
And your method is fine too. If I have a number n that I want to convert to base b, I find the quotient q and remainder r of the highest power of b that is less than |n|, and keep applying this recursively to r with decreasing powers of b. The quotients give you the digits of n in base b.
Of course, this is the r/Mathematica subreddit so we should probably just use Mathematica: