Simple computer design using Logic Sim


For this project, I am building a simple 4-bit computer using Logic Sim, a digital logic simulator for the Macintosh.

Now complete!

Working 4-bit computer. The current design will add two hexadecimal numbers. The process is automated--all a user has to do is enter the two values to be added, flip the init switches (to initialize the microprogram counter (MPC), a step I hope to eliminate) and start the clock. In three clock cycles the sum will be displayed in the top output (sorry, no support for sums over 15).

No shifter?

Due to the limitations of Logic Sim (it has problems simulating circuits with more than 900 gates) I've had to significantly change my goal from a fully-functional microprogrammed 16-bit computer to a simpler 4-bit machine microprogrammed to add (maybe also subtract) two 4-bit numbers. Since neither adding or subtracting requires shifting, and since a two-instruction macro-language wouldn't require shifting to decode, I've left out the shifter. Depending on how well the integration of a control path fares, I may add the shifter to allow decoding of a 4-instruction macro-language (ADD, SUB, MOV, HALT or something).

No MAR or MBR?

Memory addressing is currently controlled directly by the microprogram.

How does it work?

Very well. The design below will add two 4-bit numbers and display the result in 3 clock cycles. However, though this greatly resembles Tannenbaum's microprogrammed computer, it is not truly microprogrammed. Rather, it is microprogrammable. That is, at the moment there is no macrolanguage support, all memory addressing is directly controlled by the microcode, and memory is just large enough to add two numbers--but the basic structure of a microprogrammed computer is there and simple hardware adjustments can be made to greatly improve functionality. All that really needs to be added is a larger memory (which would continue to have a multi-segmented memory--read-only, read/write, write only--to simulate an input device, output device, and main memory) and a larger microprogram.

Click on the components to view a circuit diagram and description.




Untitled Document

Network communications for robots

A Mac-1 assembler

Static memory for LogicSim

A Simple Expression Compiler

A stack machine assembler

CS63
homepage

A 1-bit ALU hardware implementation

N64 architecture revealed

A simple machine using Logic-Sym

An 8-bit ALU using Logic-Sym

A stack machine simulator


stoneda@cs.earlham.edu
Back to cs63