How to convert SOP to canonical SOP form