hi,
i m working on a project and want some opinions on how to implement certain things ,the description is below,

i m making a logic gates simulator.if u give it some equation it should generate truth table and diagram.
if u give diagram then produce its equation and truth table.

implementation of truth table part:
i am converting string equation in to postfix form then solving it to get the final result(all right till here)

implementation of generating diagram from equation?????????
i m confused please help.just give me a general idea ill be thankful