Elektronika B3-21

Datasheet legend
Ab/c: Fractions calculation
AC: Alternating current
BaseN: Number base calculations
Card: Magnetic card storage
Cmem: Continuous memory
Cond: Conditional execution
Const: Scientific constants
Cplx: Complex number arithmetic
DC: Direct current
Eqlib: Equation library
Exp: Exponential/logarithmic functions
Fin: Financial functions
Grph: Graphing capability
Hyp: Hyperbolic functions
Ind: Indirect addressing
Intg: Numerical integration
Jump: Unconditional jump (GOTO)
Lbl: Program labels
LCD: Liquid Crystal Display
LED: Light-Emitting Diode
Li-ion: Lithium-ion rechargeable battery
Lreg: Linear regression (2-variable statistics)
mA: Milliamperes of current
Mtrx: Matrix support
NiCd: Nickel-Cadmium rechargeable battery
NiMH: Nickel-metal-hydrite rechargeable battery
Prnt: Printer
RTC: Real-time clock
Sdev: Standard deviation (1-variable statistics)
Solv: Equation solver
Subr: Subroutine call capability
Symb: Symbolic computing
Tape: Magnetic tape storage
Trig: Trigonometric functions
Units: Unit conversions
VAC: Volts AC
VDC: Volts DC
Years of production: 1977-? Display type: Numeric display  
New price: SUR 350.00   Display color: Red  
    Display technology: Light-emitting diode 
Size: 7½"×4"×2" Display size: 8+2 digits
Weight: 12 oz    
    Entry method: Reverse Polish Notation 
Batteries: 4×"D-0.55C" NiCd button Advanced functions: Trig Exp 
External power: BP2-3 adapter   Memory functions:  
I/O:      
    Programming model: Keystroke entry 
Precision: 8 digits Program functions: Jump Cond Subr  
Memories: 13 numbers Program display: Keycode display  
Program memory: 60 program steps Program editing: Overwrite capability  
Chipset:   Forensic result:  

b3-21.jpg (30330 bytes) 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. Its designers who, I am told, worked at the Crystal Research Institute in Kyiv, Ukraine, 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.

Another oddity: this calculator uses the strangest-looking rechargeable batteries, oversize button cells (they remind Andrew Davie, curator of the Museum of Soviet Calculators, of miniature land mines.)

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 the USSR; 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 Soviet 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:

01 06    ^
02 14    1
03 43    \(\circlearrowleft\)
04 16    x-y
05 14    1
10 86    -
11 49    x>=0
12 22    22 (F 2)
13 53    \(\circlearrowright\)
14 26    ×
15 43    \(\circlearrowleft\)
20 58    БП
21 05    05 (F ^)
22 53    \(\circlearrowright\)
23 78    C/П
24 58    БП
25 01    01 (P 0)

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.

01 51    P 5
02 16    x-y
03 21    P 2
04 16    x-y
05 38    xy
10 06    ^
11 22    F 2
12 36    ÷
13 31    P 3
14 41    P 4
15 22    F 2
20 14    1
21 96    +
22 21    P 2
23 06    ^
24 52    F 5
25 16    x-y
30 36    ÷
31 06    ^
32 32    F 3
33 26    ×
34 31    P 3
35 06    ^
40 42    F 4
41 16    x-y
42 96    +
43 41    P 4
44 86    -
45 59    x=0
50 15    15 (F x-y)
51 42    F 4
52 06    ^
53 52    F 5
54 33    ex
55 36    ÷
60 78    C/П
61 58    БП
62 01    01 (P 0)