For example, if two grayscale images, one with
aintensity and the other with
bintensity, are added the resultant image should be of
a + bintensity.
As with almost anything in Photoshop, there are several ways to do this, depending on what fits your needs and your workflow.
Among the Blend modes, Add is called “Linear Dodge”. It says that, in fact, right in the menu. You can, therefore, place your images one above the other and apply Linear Dodge to the upper one. All of the “Lighten” Blend Mode group are variations of Add, but Linear Dodge is a straight arithmetic operation. All of the calculations involved in the different blend modes are documented here.
If you are specifically looking for grayscale output, Calculations (
Image > Calculations) has been around since the Pharaohs, or thereabouts. This allows you to (among many other things) Add two channels to create either a new channel or a new grayscale document. This works across images, not just with layers. The two images must have exactly the same size pixel dimensions.
Calculations is unique in that it can take the gray values of an RGB image and blend them with the gray values of another RGB image to produce a grayscale output.
Another that’s been around since Noah is Apply Image. Once again,
Image > Apply Image can be used with two channels in one document, a channel with the RGB composite “channel” of the same document, or either of those across two documents of the same dimensions. It’s different from Calculations because it does not create a new channel or document, and its output will be in a color mode if applied to a color composite.