A parse tree shows how a formula is built: the connective applied last sits at the root, its parts hang below it, and the letters are the leaves. Find the main connective, split, and repeat on each part.
| Step | On | |
|---|---|---|
| 1 | Restore the brackets. Precedence, tightest first: , , , , . A applies only to what directly follows it. | |
| 2 | Find the main connective. It is the one connective outside all brackets, and it is applied last. | main connective: |
| 3 | Make it the root and hang its parts below. A binary connective gets a left and a right child; gets a single child. | root ; children and |
| 4 | Repeat on every part. Split each child at its own main connective until every branch ends in a letter. | with children and ; with child |
| 5 | Evaluate from the leaves up. For one row, write the letter values at the leaves and compute each node from its children; the root gives the value of the formula. | at , , : is T, is T, the root is F |