3
Data Flow in a Computer
In this chapter, we will learn how a computer executes an instruction. We have to understand how a computer operates internally before we can simulate its behavior in Python. We will also introduce the concept of a computer instruction (the smallest operation that it can be commanded to perform) and show you what a computer instruction looks like.
What is a computer? How does it work? What does it do? We will answer these questions by demonstrating how a computer can be designed using Python, and how programs can be run on this simulated computer. Here, we are interested only in how a computer behaves at the machine level – that is, the type of operations it carries out. We are not concerned with the internal design of the computer or how the computer is implemented electronically (i.e., the circuits used to build a computer).
We will cover the following topics in this chapter:
- The instruction set architecture (ISA)
- The Von Neumann...