The Knob & Switch Computer:
An Incremental Machine Simulator
for Breadth-Based CS Courses
Department of Mathematics and Computer Science
The Knob & Switch Computer Simulations:
The Knob & Switch Computer uses an intuitive metaphore and an incremental approach to introduce introductory CS students to the big ideas in computer organization. Students are introduced to a datapath containing an ALU and 4 registers. The ALU operation and the registers on which it will operate are selected by rotating (clicking) a collection of knobs. A second increment adds a main memory unit to the datapath along with switches that control the flow of data between the CPU and the memory. The third increment adds a microprogram control unit that allows the machine to be programmed using 1's and 0's that correspond to the knob and switch settings. The final increment turns the K&S into a complete stored program computer that executes assembly/machine language programs stored in its main memory unit.
The remainder of this page contains simulators for each of these increments, links to presentations and papers that describe the K&S computer, links to courses and materials that use the K&S computer and downloads for the K&S computer source code.
NOTE: The following links open a new browser window and work best if your browser's default fonts are set to 12 point.
- The K&S Datapath Simulation
- This simulator introduces the K&S datapath. The key features are the knobs and switches that can be set to control the operands, operations and storage of the result.
- The K&S Datapath Simulation with Main Memory
- This simulator adds a main memory unit to the datapath to increase the storage capacity of the machine. The key features are that memory accesses require more time than register accesses, and that memory and ALU operations happen in parallel even though one of them will be ignored.
- The K&S with Microprogramming
- This simulator makes the K&S programmable by adding a microprogram store. The concept of microprogramming is intuitive in that the bits of each microprogram simply encocde the positions of the knobs and switches.
- The Complete K&S Model 1 Computer
- This simulator is a complete stored program computer. It uses a control unit that translates machine language commands into the microinstructions that carry out the operation. Instructions entered in main memory locations in assembly language are automatically assembled into machine language. The assembly / machine language instructions are documented on the: Assembly/Machine Language Programming Card.
Related Papers () & Talks ():
The Knob&Switch Computer is also featured in a text published by Prentice Hall:
The following paper and presentation discuss an earlier version of the K&S computer:
Courses That Have Used the Knob & Switch Computer:
- CS 131 - Introduction to Computing I at Dickinson College.
- CSC121 - Computers and Scientific Thinking at Creighton University (Dr. David Reed).
- CSC107 - Introduction to Computing Concepts at Creighton University (Dr. David Reed).
- COMP 220 - Computer Organization at Wheaton College (Dr. Michael B. Gousie).
- Cpt S 121: Program Design and Development at Washington State University (Mr. Gaoyan Xie).
- CMPSC 100 - Computer Fundamentals and Applications and MATH 017 - Finite Mathematics, at Penn State, Schuykill Campus (Prof. Jeffrey A. Stone).
- CPS 103 - Overview of Computer Science, at Shippensburg University (Dr. Carol Wellington).
- CS 101 - Introduction To Computer Science, at The University of Northern Colorado (Dr. Peter Isaacson and Dr. Terry Scott).
- MCS 170 - The Nature of Computer Science, at Gustavus Adolphus College (Michael Hvidsten, San Skulrattanakulchai and David Wolfe)
The following links contain the latest version of the K&S computer:
The following links contain the original version of the K&S computer (The newer version is recommended):