BINARY OPERATIONS IN CLASSICAL AND QUANTUM MECHANICS