40. Find the output of each of these combinatorial circuits.
a)
b)
41. Find the output of each of these combinatorial circuits.
a)
b)
42. Construct a combinatorial circuit using inverters, OR gates, and AND gates that produces the output \( (p \wedge \neg r) \vee(\neg q \wedge r) \) from input bits \( p, q \), and \( r \).
43. Construct a combinatorial circuit using inverters, OR gates, and AND gates that produces the output \( ((\neg p \vee \neg r) \wedge \neg q) \vee(\neg p \wedge(q \vee r)) \) from input bits \( p \), \( q \), and \( r \).