Instrument for logical operations with electrical signals