Linkage Adding Mechanism

Turn the violet crank to enter value X.
Turn the orange crank to enter value Y.
The red arrow on the blue slider shows S = X + Y (algebraic addition).
The video shows the operation 2 + 4 = 6 and the return to initial position.
The slot on the green slider must be parallel to the sliding direction of the blue slider in order to keep the independence between X and Y entering.
Angle of the pink arm is A = 90 deg. Angle between sliding directions of the green and blue sliders is B = 90 deg. This ensures that the displacements of the green slider and the blue one are equal when the yellow slider is immobile.