Base for logic gates simulation and first sample with SR latch