SMS: Logic functions and equations