Generating Pseudorandom Numbers with Elementary Cellular Automata

This Demonstration generates a pseudorandom number using various class-3 and class-4 elementary cellular automata from initial conditions. The black and white squares from the central column are converted to base 2 to give a number between 0 and 1. You can increase the number of digits with the "size" control.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The initial condition seed is converted to base 2 and placed as a row, where 1 is a black square and 0 is a white square. The rule is generated from this initial condition, and a column is taken from the plot based on the column seed. The column is taken as a binary number and converted into decimal to generate a random number between 0 and 1. The first bit in the column is not used in the generation.
This was a project for Advanced Topics in Mathematics II, 2019–2020, Torrey Pines High School, San Diego, CA.
[1] S. Wolfram, A New Kind of Science, Champaign, IL: Wolfram Media Inc., 2002.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.