I mean the "hanging something from a wall" idea should compose pretty nicely, because it reduces to group theory (each fixed point is a variable, clockwise and counterclockwise turns are group elements and their inverses). So the picture example would be a b a' b'. Lets call that an or gate. An and gate would be a b. The inverse of any winding is (x y)' = y' x'. So you can say e.g.
(a ∧ b) ∨ c = (a b) ∨ c = (a b) c (a b)' c' = a b c b' a' c'.
You can construct a winding from this.