top of page

Software details

All of the software was implemented in microcode as described earlier.

​

A complete listing of the microcode can be found here. The mnemonics are:

  • .A = ALU address A

  • .B = ALU address B

  • .ALUs = ALU input source

  • .ALUf = ALU arithmetic/logic function

  • .ALUd = ALU output destination

  • .nOE = !Output enable for ALU to data bus

  • .Cn = Carry input to ALU

  • .WR = write enable to external registers

  • .AorC = address of register or constant to input to ALU

  • .AnC = if 1 .AorC is treated as an address; if 0, .AorC is a constant inputted to ALU

  • .MPC = Controller (2910) opcode

  • .CCsel = condition code select

  • .CCinv = invert condition code

  • .NA = next address

​

The overall program flowchart is:

TTL Calculator Main Flowchart.png

The algorithm for calculating logs and anti-logs is based on my sketchy understanding of the algorithm used by the Wang 320 calculator. I was able to get an idea of it from the Wang patent and I modeled it in Python before putting it into microcode.

​

The routine for calculating logs reduces the display register to 10000000 while accumulating the log of the display register in the log accumulator. It moves from one log constant to the next based on whether the most significant digit of the display "Disp[7]" has been reduced below or increased above 1. For example, if the display held 54678, once this completes, the display will be cleared and the log accumulator will contain 47378126 (the base-10 log of 5478 is 4.7378126). Details below:

TTL Calculator log routine.png

The routine for calculating anti-logs reduces the log accumulator to 0 as it constructs the anti-log in the display. It moves from one log constant to the next based on whether the most significant digit of the log accumulator "LogAcc[7]" has been carried into or borrowed from. I also use the trick of including the "Sign digit" as a most-significant one or zero in the display register to get a little more precision. Also, the code rounds up if needed. Details below:

TTL calculator anti-log routine.png
bottom of page