Beeler, M., Gosper, R.W., and Schroeppel, R. HAKMEM. MIT AI Memo 239, Feb. 29, 1972. Retyped and converted to html ('Web browser format) by Henry Baker, April, 1995.


Previous Up

ITEM 181 (Gosper):

A bug you might try to avoid when designing floating point hardware, relating to excess-200, 1's complement exponent, 2's complement fraction convention:
  1. An advantage is that negation and numerical comparison can be accomplished with the same instructions for both fixed and floating point numbers.
  2. A disadvantage is that the termination of the normalization process is ambiguous. Normally, when the sign bit unequals the highest bit of fraction, the number is normalized. A special case arises with negated powers of two. (That is, -(2^n), not (2)^-n.) Then the fraction is 400,,0 and the sign is - also.
This means it is necessary to check whether shifting left one more bit will bring in a one: If you should but don't, rounding will un-normalize, and when you then re-normalize, the normalizing amount will be doubled, so you will be off by 2 smidgens (that is, the next to low order bit). Note that rounding can over-normalize as well as un-normalize, so you can't just stop normalization after rounding.

You might check this in your PDP-6/10. For example, combine 201400,,0+delta with minus 200777,,777777+2delta. For 0 <= delta <= 7777, the correct FMP result is minus 200777,,777776, and the correct FMPR result is minus 200777,,777777.

Over-normalized negative powers of 2 work in compares and most floating arithmetic. They lose with MOVN and as dividends. Unnormalized floating operands win completely on the PDP-10, except as divisors and dividends, the latter suffering truncation error.


Fairchild is now supplying positive voltage regulators costing about 2 dollars in lots of 1 (for example, the uA7805 for +5 volts).


The CA3083 (and CA3084) transistor arrays can be used to make neat current mirrors. (A current mirror supplies a current on one wire equal to that drawn from a second wire.)

ITEM 184 (Roe): ONE-SHOT

A dual MOS D-type flip-flop (such as the CD4013AE) can be used to make a one-shot as follows:


Everyone has their own favorite oscillator circuits; here are some we like.


In work on education at our lab, we built a motorized "turtle" controlled by computer commands in the child-oriented language "Logo". The following is a transmitter designed as a radio link between the computer and turtle. Input (modulation) is either 0 or +1 volts; output is about 88MHz. Use a commercial FM tuner as receiver. Note: this transmitter is ILLEGAL no matter what; part 15 low power rule only allows if duty is less than about 1 second per 15 minutes. Don't worry about it unless you interfere with broadcast stations.


When the chess program written at our lab is playing in a chess tournament, a human attendant at the tournament moves the pieces, punches the clock, and communicates with the program via a portable terminal coupled to a telephone line. It is desirable that the program know when its chess clock is running, even though the attendant may not notice immediately that the opponent has made his move and punched the clock. Therefore we built a clock holder with a microswitch to sense the clock state. The following is a 10 mw transmitter whose input is the microswitch and whose output goes onto the phone line. It switches between two frequencies, about 320 and 470 Hz. Also shown is the receiver. Input should be at least 100 mv rms (threshold is 20 mv and overload is above 68 volts) with peak to peak signal to noise ration grater than 4:1. As we all know, connections to phone lines are illegal unless made through a data coupler supplied by TPC (The Phone Company).


One version of the "turtle" mentioned above (see RADIO LINK) uses a DC motor to drive each of its two powered wheels. since its path is to be as straight as possible, a triangular pulse is generated (to represent one "step" of the motor) and the motor's velocity servoed to this analog command. An additional digital command enables forward or reverse motion. Diagram I shows a simplified velocity servoing circuit. It has the disadvantage that only half the maximum voltage available (-V to +V) can be applied across the motor at any one time. Diagram II shows the actual circuit used in the turtle.


When two circuits are at potentials differing by a few hundred volts but wish to communicate with each other, one solutions is to use an optical coupler. these employ a light-emitting device placed close to a light-sensitive device. diodes make very fast-responding sensors, but the signal from a light-sensitive transistor is much stronger. shown is a compromise, using a transistor as a diode, with associated cleverness to get the delay (from input to output) down from 10 microseconds to 1.


In our fourth computer-interfaced image sensing device, TVD (really a vidissector, not a TV), the photocathode sits at several thousand volts negative. Nevertheless, one wishes to sense the current it draws, since overcurrent should shut down the photocathode voltage to avoid damage to the photocathode. The following circuit draws no more than 400 microamperes at 10 volts (at 20 KHz out; about 200 microamperes at 10 KHz) and couples the current information out as the frequency sent to T2, whose coils are wound on opposite sides of a ceramic ferrite.


TVD, mentioned above, uses a very carefully designed printed circuit amplifier to supply current to its magnetic deflection coils. Except for the notes with the diagram, we submit it without further explanation or cautions.


  1. Except where noted, resistors 10%, 1/4 watt.
  2. Capacitances in microfarads/volts; electrolytics aluminum.
  3. Diodes 1N4727, 1N4154, 1N4009 etc.; stored charge no more than 80 picocoulombs at 1 milliampere forward current.
  4. 1D103 = GE thermistor mounted at center of main heat sink.
  5. 220J = Analog Devices chopper amplifier.
  6. * = temperature protection circuit (overtemperature cutout).
  7. Q2, Q3, Q4, Q5, Q6, Q12,l Q13, Q14, Q15, Q16 mounted on one 1 Centigrade degree per watt heat sink (e.g., Wakefield 621K 1/2 inch in front of Rotron Muffin fan). Case temperature about 70 degrees C max. Ground heat sink and insulate transistors.
  8. All transistors Motorola.
  9. All zeners 1 watt.
  10. VE48X = Varo; could be two 2 A 50 PIV fast recovery.
  11. Output capacitance about 800 pf; damping R about 150 ohms for critical damping.
  12. Slews from + (or -) 2 A to - (or +) 2 A in 4 microseconds; dE/dt is hot side of deflection coil is about a billion v/sec.
  13. Layout is critical, as with most fast high-gain circuits.
  14. The 100 pf stabilizing capacitor may want to be higher to decrease hunting and ringing, which could improve settling time more than the reduced gain-bandwidth would increase it.
Q1,  Q12, Q13   MPS-U01
Q11, Q2,  Q3    MPS-U51
Q4,  Q5,  Q6    2N5194
Q14, Q15, Q16   2N5191
Q7              MPS-U02
Q17             MPS-U52
Q8,  Q19        2N3906
Q9,  Q18        2N3904

Previous Up