Shape Computation Lab

Sorting Binary

Tzu-Chieh Kurt Hong

03/01/2019

Sorting is an important algorithmic operation in programming. This video is aiming to demonstrate that binary sorting can easily be done by applying a simple shape rule with Shape Machine. Instead of writing code to sort binary digits, Shape Machine allows users to visually program this logic by considering the symbols 0 and 1 as shapes drawn in the shape rules: 10 --> 01 or 01 --> 10. The first rule when applied multiple times over a string of shapes made up of 0s and 1 produces the so-called big-endian order consisting of all 0s to the left and 1s to the right. The second rule when applied multiple times over a string of shapes made up of 0s and 1s produces the so-called little-endian order consisting of all 1s to the left and all 0s to the right. This video is a proof that Turing machine can be covered by the shape grammar formalism.

Links