Book Image

Computer Architecture with Python and ARM

By : Alan Clements
Book Image

Computer Architecture with Python and ARM

By: Alan Clements

Overview of this book

This comprehensive guide offers a unique and immersive learning experience by combining Python programming with ARM architecture. Starting with an introduction to computer architecture and the flow of data within a computer system, you’ll progress to building your own interpreter using Python. You’ll see how this foundation enables the simulation of computer operations and learn ways to enhance a simulator by adding new instructions and displaying improved results. As you advance, you’ll explore the TC1 Assembler and Simulator Program to gain insights into instruction analysis and explore practical examples of simulators. This will help you build essential skills in understanding complex computer instructions, strengthening your grasp of computer architecture. Moreover, you’ll be introduced to the Raspberry Pi operating system, preparing you to delve into the detailed language of the ARM computer. This includes exploring the ARM instruction set architecture, data-processing instructions, subroutines, and the stack. With clear explanations, practical examples, and coding exercises, this resource will enable you to design and construct your own computer simulator, simulate assembly language programs, and leverage the Raspberry Pi for ARM programming.
Table of Contents (18 chapters)
1
Part 1: Using Python to Simulate a Computer
Free Chapter
2
Chapter 1: From Finite State Machines to Computers
10
Part 2: Using Raspberry Pi to Study a Real Computer Architecture

What this book covers

  • Chapter 1, From Finite State Machines to the Computers, introduces the notion of digital computers via the finite state machine that is used to model simple control systems. From there, we introduce the concept of algorithms and programs. Once we know what we want a computer to do, we can think about what we need to implement a computer.
  • Chapter 2, High-Speed Introduction to Python, provides the initial background in Python that is required to take the first steps on the way to implementing a computer using Python.
  • Chapter 3, Data Flow in a Computer, demonstrates how information flows around a computer during the execution of a program. It is this data flow that we have to implement when we are simulating a program in software.
  • Chapter 4, Crafting an Interpreter – First Steps, begins the journey to a simulator. Now that we have been introduced to the concept of a computer and a little Python, we can go further and describe the fundamental ideas behind a computer simulator. In this chapter, we also look at the nature of computer instructions.
  • Chapter 5, A Little More Python, expands our knowledge of Python and introduces us to vital topics such as Python’s dictionaries, which provide tools that greatly simplify the design of a computer simulator.
  • Chapter 6, TC1 Assembler and Simulator Design, is the heart of this book. Here, we discuss the components of a simulator and then provide a program that can simulate a hypothetical teaching computer, TC1.
  • Chapter 7, Extending the TC1, adds further facilities to the simulator, such as data checking and creating new instructions.
  • Chapter 8, Simulators for Other Architectures, looks at different types of computer architecture and describes alternative simulators.
  • Chapter 9, Raspberry Pi – An Introduction, changes course. Here, we look at the popular Raspberry Pi and the ARM processor at its core. In particular, we learn how to enter a program in ARM assembly language and run it in debugging mode.
  • Chapter 10, A Closer Look at the ARM, examines ARM’s instruction set in greater detail and provides a foundation for writing programs in assembly language.
  • Chapter 11, ARM Addressing Modes, looks at the addressing modes of the ARM in greater detail and explains some of its special features.
  • Chapter 12, Subroutines and the Stack, is really an extension of the previous chapter because we look at the way in which the ARM uses its addressing modes to implement stack operations, which are so important in assembly language programming.