A cumulative XOR calculation. The XOR operation takes two Boolean inputs and produces a 0 if they are the same and a 1 if they are different. Shown in a are blue input tiles, Xi which represent 0 or 1, according to the presence of a particular restriction enzyme site. These have been assembled in a particular order in b. The red tiles in a contain the four Boolean possibilities as sticky ends on their lower helices. The input is connected to the output through the green C1 and C2 tiles. At the end of the self-assembly, one strand that runs through the entire system is ligated together, thereby connecting the input to the output. It is read by partial restriction, followed by a denaturing gel, much like a sequencing reaction.