title: NIST Randomness Tests requires a sequence of ASCII 0's and 1's but does not accept any trial from MATLAB
body: <p>I am trying to use NIST randomness test suite for randomness tests of my long 0-1 bit sequences. 
  It requires me to supply either the ASCII zeroes and ones or a binary file each byte with 8 bits of data. However, I tried</p>
  
  <p><code>save(...,'-ascii')</code>, <code>fwrite()</code> and some other commands to make it work but it does not accept and it gives me a <code>segmentation error</code> + <code>igamc: UNDERFLOW error.</code> </p>
  
  <p>If anyone can say how to create the exactly matching format it will be really good In addition if anyone knows MATHEMATICA they created their own sample files as below from MATHEMATICA , maybe it can help about the format and you can tell me what to do in MATLAB.</p>
  
  <pre><code>BinExp[num_,d_] := Module[{n,L},
  
  If[d &gt; $MaxPrecision, $MaxPrecision = d];
  
  n = N[num,d];
  
  L = First[RealDigits[n,2]]
  
  ];
  
  SE = BinExp[E,302500];
  
  Save["data.e",{SE}];
  </code></pre>