The truth table would have 64 entries for the variables p,q,a,b,Xp,Xq which is not recommended here. Instead, I show you a BDD with the optimal variable ordering which is quite small:
We may also read a DNF from this diagram:
!Xp&!p&!a&!q |
!Xp&!p&!a&Xq&!b&q |
Xp&p&!a&!q |
Xp&p&!a&Xq&!b&q |
Xp&a&!q |
Xp&a&Xq&!b&q