1. A method for representing a shape within a layout of an integrated circuit using a Boolean expression, comprising: receiving a representation of the shape; converting the representation into the Boolean expression, wherein the Boolean expression is formed using a Boolean coordinate system expressed in a two-dimensional Gray code; and performing an operation on the shape by performing a Boolean operation on the Boolean expression for the shape.