|TAMS / Java / Hades / applets: contents | previous | next|
adders and arithm...
LFSR and selftest
I/O and displays
CMOS circuits (sw...
Mips R3000 cosimu...
Intel MCS4 (i4004)
MCS4 binary ...
MCS4 BCD add...
MCS4 binary ...
MCS4 BCD sub...
MCS4 RAM add...
MCS4 RAM sub...
MCS4 I/O ports
image processing ...
[Sch04] RALU, Min...
|Intel MCS4 (i4004) calculator
This applet shows a simple calculator
built with the MCS4 system.
The circuit consists of the i4004 microprocessor, two i4001 ROM chips with the calculator program, one i4002 RAM chip to store the operands and result value, and some discrete interface logic with the input switches. However, no display is provided in this applet. Please open the memory editor window of the i4002 RAM chip to read-off the input operands and the final result value. Obviously, a 'real' calculator would include a (multiplexed) seven-segment display and more functions.
The program running on the i4004 implements a simple binary-coded decimal pocket-calculator with just two operations: addition and subtraction. After the applet has loaded, simply click the input switches to type in the first argument number, next type in the operand, type in the second argument, and finally type the enter key. The program now calculates the result value.
Please open the memory editor of the i4002 RAM chip to watch the program execution. The register banks 0 and 1 are used to store the BCD numbers of the first and second arguments, while register bank 2 is used to store the operation result.
The calculator program is stored in two i4001 ROM chips. One ROM chip is loaded with the binary code corresponding to the assembly source file input.asm. It polls the pressed keys, stores the numbers in the RAM, clears the RAM banks and calls the calculation subroutine.
The second ROM holds the routines for addition and subtraction, based on this assembly source file: calc.asm. For a detailed description of the program operation, please see the original BSc. thesis, pages 38-46 (see link below).
|Print version | Run this demo in the Hades editor (via Java WebStart)|
|Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German)|