added truth table and waveform outputs