I am totally new to mathematica but started learning how to use it. I use the following function to convert a decimal number into its binary representation.
binExp[num_, d_] := First[RealDigits[N[num, d], 2]];
Currently, I am stuck with two points:
If I type
binExp[240, 7], I get a 23-bit binary representation of a decimal number in the interval
[0,255]BUT I need a 24-bit binary representation of it.
I have a
100,000decimal numbers stored in a text file and want to use the previous function within mathematica to convert all of them to their 24-bit binary representation and store them back in a text file.
Any help is appreciated.