The Minimalist Calculator
Abstract: You might expect a machine that multiplies, divides and takes square roots to need special circuits for each job. It doesn't. This article describes the Minimalistic Calculator, which does all of its math with just two parts, one that adds and one that inverts, plus memory and a controller that runs the steps in order. Subtraction, multiplication, division and even square roots all turn out to be simple patterns of addition and subtraction. Extra hardware makes math faster, but it is never needed to make math possible. Want to compute PI to 1,000 places? This can be done too using the minimalistic approach. Let's see why this is true.
All arithmetic can be performed with just four elements: an adder, an inverter, a data sequencer and storage registers. The adder does the addition, and the inverter produces negative numbers (2’s complement) so that subtraction is possible. The adder’s carry-out directs the sequencer’s next step. This is true for computers and calculators since they share the same math subsystem. This may seem counter intuitive so let's dig deeper. See Figure 1.

Fig 1, Doing arithmetic with minimal hardware (Kovalick)
Marvin Minsky [Minsky] showed that multiplication, division, square roots and floating-point math are just sequences of additions and subtractions directed by the carry, and they need no further arithmetic hardware. Additional hardware adds speed, not capability.
The R30 was constructed based on this premise and therefore only has a hardware adder, hardware inverter and a microcontroller for sequencing and for data storage.
At one time I thought that a calculator also required right/left bit shifters, muxes, zero detectors, bit masks and more. I was wrong. Sure, these may speed up some operations, but an adder and an inverter are sufficient to do all math ops.
Reference: Minsky, M. L., Computation: Finite and Infinite Machines. Prentice-Hall,1967
All you need is adding
To understand how only 4 components can execute all calculator math, let’s briefly review the common binary operations for long division.

Fig 2, Long division steps to divide two numbers
So, step 1 is a left shift, step 2 is add or subtract, step 3 is set a bit (store) and step 4 is a right shift. It turns out that for multiply (the inverse of divide), there is a left shift required during the multiply process. We all learned "restoring division" in primary school but "non restoring" is easier to execute in hardware. Let’s see how to do the shifts using only an adder.
• A shift left is done by adding a number to itself (A + A), this doubles it. 00110 becomes 01100 .
• A shift right can be done using a method we will call shifting right by shifting left.
Shifting bits right by shifting bits left
A right bit shift of a 32-bit number can be implemented without a hardware-based right shift register by performing 31 successive modular doublings using an adder.
Each doubling corresponds to a one-bit cyclic left rotation. 31 such rotations therefore produce a one-bit right rotation. Although very inefficient, the method allows a right-shift operation to be synthesized using an integer adder rather than additional shift hardware.
Here is an example of dividing 4 by 2 (Fig 3). In this case A=4 to start. Each addition of A + A gives a left shift as seen in steps 1, 2 and 3. At step 2 the Carry-out = 1 and is fed to the Carry-in (circular rotation). So, at step 3 the result is 2 = 4/2 and this is the same as one right shift of A in a standard shift register.

Fig 3, Shifting right by shifting left
Trading speed for simplicity
These methods trade longer execution time for less hardware. I was surprised to find an “adder solution” for every bit-manipulation operation I examined (including AND, OR, XOR, and NOT). Also, these principles allowed the R30 design to be lightweight, portable, and still be a legitimate relay-based calculator/computer of Class 3.
Some readers may object to this approach based on calculation speed and say, "For the speed increase, the extra hardware is well worth it." In fact, most CPU architectures use very advanced techniques for speeding up math calculations. Unfortunately, the R30 can't afford these due to the extra size and weight especially when using 1940's era relays. The page on the Arithmetic Logic Unit reviews speed up methods that would be very useful for a relay-based machine if size and weight were not a driving factor.