Logical circuits simulator