See Sum addressed decoder.
Pozri Sum addressed decoder.