Elektronika B3-21

The B3-21 was the first Soviet-made programmable hand-held calculator. It is actually a quite capable beast, but one cannot help but notice the "rough edges." On the other hand, this machine puts to shame several contemporary Western models, so its designers have reasons to be proud; especially when one considers the difficulties they faced, given the lack of a high-technology infrastructure in the Soviet Union.

The B3-21 has 60 program steps, numbered in an unusual fashion: 00, 01, 02, 03, 04, 05, 10, 11... 93, 94, 95. Following step 95, another 36 steps can be seen in program memory, but these are merely a shadow copy of steps 00-55.

The first B3-21 model that came into my possession uses red LEDs for display (machines with a green VFD tube were also made). The digits look remarkably similar to those seen in HP "classic" calculators such as the HP-65, so I disassembled the machine to take a closer look. Without desoldering the LED modules to see the markings at the bottom, I cannot tell for sure, but I swear these are Hewlett-Packard LED modules! They look identical, they're the only DIP-packaged modules in the calculator, they're the only ones with gold-plated pins, the placement of the decimal point is identical, the shape of the digits is identical... if it looks like a duck, quacks like a duck, it stands to reason that it is a duck!

The 15 digits in the 3 modules were used in the B3-21 with remarkable inefficiency. 3 digit positions remain permanently dark (one on the left, one between the mantissa and the exponent, and one on the right.) The calculator is capable of 8 digits of precision, but when it displays a decimal point (which takes up a digit position, just like on HP calculators) only 7 digits remain on the display. HP calculators used 15 digit positions to display a 10-digit mantissa and 2-digit exponent!

This is not the first time that I am holding one of these machines in my hands. Some 20 years ago, the father of one of my high-school classmates happened to work for a Hungarian importer that received some sample calculators from Russia; my classmate brought a Soviet programmable calculator to school one day. I remember that we were both amused by some of the calculator's odd features, and baffled by some of its odd functions.

For instance, the B3-21 (just like a few other Soviet-made scientific calculators at the time) has an eix button: this button places the sine of the argument in register X, and the cosine in register Y. Never mind RPN; to assume that your customers are aware of the formula eix=cosx + isinx, that's not something the marketing department of any Western calculator manufacturer would have permitted!

The B3-21 also has a rather unusual arrangement of registers and memories. It is a reverse polish calculator but its operating stack is only two levels deep (X and Y registers.) Automatic stack lift does not occur before many operations (e.g., when recalling a number from a register.) The machine has 7 registers and no separate store or recall buttons; the F and P second-function buttons, in combination with the digits 2-8, can be used to store or recall numbers. (Registers 0 and 1 correspond with the X and Y registers, respectively, whereas register 9 seems to contain results of intermediate operations.)

In addition to the numbered registers, the calculator has a 7-position "ring stack". Two buttons rotate this stack clockwise and counterclockwise. One of the 7 positions is the X-register (that is, the display.)

The programming model is very similar to that of the B3-34 and later Soviet calculators. In addition to the program counter, the three most recent program steps are displayed in program entry mode. (Before I got my hands on a Compucorp 326, I thought that this display format was unique to Russian models.) Program steps are essentially unmerged, with two exceptions. First, the second-function keys F and P are merged with the subsequent keystroke; second, GOTO instructions are followed by a two-digit location code that is stored as a single program step. No synthetic programming here, mind you; the location cannot be keyed in using the number keys, you actually have to look up the key with the keycode corresponding with the intended target of the GOTO. This is made even more difficult by the fact that keycodes are not derived from the keys' physical position on the keyboard. (Oh, and did I mention that a conditional jump instruction like x>0 actually skips the address if the condition is true, and performs the jump if it's false?)

What I like the most about these early Soviet calculators is that they are clearly not copycat Western machines. A lot of originality went into their design, which is all the more remarkable given the difficulties of obtaining the required high-tech parts and materials in the Soviet Union. I applaud the efforts of these designers who were able to overcome all these obstacles and built hand-held calculators that work reliably more than a decade after being made, especially in view of the known problems with substandard parts and manufacture in the former USSR. The quality of these engineers' work is also visible in the documentation. Printed on low-grade paper, typeset with a typewriter with keyboard symbols and mathematical formulae drawn by hand, they appear low-quality, but in reality, they are so well written that even someone like myself, with a rather limited knowledge of Russian, can easily decipher their contents. I wish I could say the same about some English-language product manuals!

Given the limitations of only 60 program steps and a 2-level operating stack, I did not find a way to shoehorn a polynomial Gamma function implementation into this machine's program memory. A factorial program, however, didn't prove to be a difficult challenge, and it nicely demonstrates the use of the ring stack for temporary storage and the use of conditional instructions:

I was also able to implement the incomplete Gamma function. This can also be used to get a good approximation of the Gamma function itself when a high enough integration limit is used. For instance, 5 ^ 24 C/П yields 23.99996, pretty close to 24, which would be the Gamma function of 5. The program is also reasonably fast; it seems that the B3-21 actually runs faster than later Soviet models like the B3-34.