Computer Architecture

Book description

Computer Architecture is an in-depth exploration of the principles and designs that have shaped computer hardware through the ages, from counting devices like the abacus, to Babbage's Difference Engine, to modern GPUs and the frontiers of quantum computing.

This engaging blend of history, theory, hands-on exercises, and real-world examples is sure to make for an insightful romp through a fast-changing world. You won't just read about computer architecture, you'll also gain the understanding to touch, build, and program it. You'll explore the basic structures of a CPU by learning to program a Victorian Analytical Engine. You'll extend electronic machines to 8-bit and 16-bit retro gaming computers, learning to program a Commodore 64 and an Amiga. You'll delve into x86 and RISC-V architectures, cloud and supercomputers, and ideas for future technologies.

You'll also learn:

  • How to represent data with different coding schemes and build digital logic gates
  • The basics of machine and assembly language programming
  • How pipelining, out-of-order execution, and parallelism work, in context
  • The power and promise of neural networks, DNA, photonics, and quantum computing

Whether you're a student, a professional, or simply a tech enthusiast, after reading this book, you'll grasp the milestones of computer architecture and be able to engage directly with the technology that defines today's world. Prepare to be inspired, challenged, and above all, see and experience the digital world, hands-on.

Publisher resources

View/Submit Errata

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication Page
  5. About the Author
  6. About the Technical Reviewer
  7. BRIEF CONTENTS
  8. CONTENTS IN DETAIL
  9. INTRODUCTION
    1. Who Is This Book For?
    2. Why Computer Architecture?
    3. Changes in the Field
    4. How to Use This Book
    5. Inside Common Devices
      1. Desktop PC
      2. Laptop
      3. Smartphone
      4. Washing Machine
    6. Book Overview
    7. Exercises
    8. Further Reading
  10. PART I. FUNDAMENTAL CONCEPTS
  11. 1. HISTORICAL ARCHITECTURES
    1. What Is a Computer?
    2. Before the Industrial Revolution
      1. The Stone Age
      2. The Bronze Age
      3. The Iron Age
      4. The Islamic Golden Age
      5. The Renaissance and Enlightenment
    3. The Steam Age
      1. The Jacquard Loom
      2. Victorian Barrel Organs and Music Boxes
      3. Babbage’s Difference Engine
      4. Babbage’s Analytical Engine
      5. Mechanical Differential Analyzers
    4. The Diesel Age
      1. The IBM Hollerith Tabulating Machine
      2. Electromechanical Differential Analyzers
      3. Electromechanical Machines of World War II
      4. The Zuse Z3
    5. The Electrical Age
      1. Pure Electronic Cryptology of World War II
      2. ENIAC
      3. Virtual Machine ENIAC
      4. The Manchester Baby
      5. The 1950s and Commercial Computing
    6. The Transistor Age
      1. The 1960s and Big Transistors
      2. The 1970s and Integrated Circuits
      3. The 1980s Golden Age
      4. The Bland 1990s
      5. The 2000s and Reconnecting the Community
      6. The 2010s and the End of Moore’s Law
      7. The 2020s, the Cloud, and the Internet of Things
    7. So Who Invented the Computer?
    8. Summary
    9. Exercises
    10. Further Reading
  12. 2. DATA REPRESENTATION
    1. A Brief History of Data Representations
      1. Tally Sticks and Trading Tokens
      2. Roman Numerals
      3. Split Tallies
      4. Arabic and Other Numerals
    2. Modern Number Systems
      1. Bases and Exponents
      2. Base 10: Decimal
      3. Base 2: Binary
      4. Base 1,000
      5. Base 60: Sexagesimal
      6. Base 16: Hexadecimal
      7. Base 256: Bytes
      8. How to Convert Between Bases
    3. Representing Data
      1. Natural Numbers
      2. Integers
      3. Rationals
      4. Fixed Point
      5. Floating Point
      6. Arrays
      7. Text
      8. Multimedia Data Representation
      9. Data Structures
    4. Measuring Data
    5. Summary
    6. Exercises
    7. Further Reading
  13. 3. BASIC CPU-BASED ARCHITECTURE
    1. A Musical Processing Unit
      1. From Music to Calculation
      2. From Calculation to Computation
    2. Babbage’s Central Processing Unit
      1. High-Level Architecture
      2. Programmer Interface
      3. Internal Subcomponents
      4. Internal Operation
    3. Summary
    4. Exercises
    5. Further Reading
  14. PART II. THE ELECTRONIC HIERARCHY
  15. 4. SWITCHES
    1. Directional Systems
      1. Water Valve
      2. Heat Diode
      3. p-n Junction Diode
    2. Switching
      1. Water Current Switch
      2. Electrical Tube Switch
      3. p-n-p Transistor
      4. Water Pressure Effect Switch
      5. Field-Effect Transistors
      6. Clocks
    3. Fabricating Transistors
    4. Moore’s Law
    5. Summary
    6. Exercises
    7. Further Reading
  16. 5. DIGITAL LOGIC
    1. Claude Shannon and Logic Gates
    2. Logic Gates
      1. Identifying Universal Gates
      2. Making Logic Gates from Transistors
      3. Putting Logic Gates on Chips
    3. Boolean Logic
      1. Logic as Arithmetic
      2. Model Checking vs. Proof
    4. Simplifying Logic Circuits Using Boolean Logic
    5. Laying Out Digital Logic
      1. 7400 Chips
      2. Photolithography
      3. Programmable Logic Arrays
      4. Field Programmable Gate Arrays
    6. Summary
    7. Exercises
    8. Further Reading
  17. 6. SIMPLE MACHINES
    1. Combinatorial Logic
      1. Bitwise Logical Operations
      2. Multi-input Logical Operations
      3. Shifters
      4. Decoders and Encoders
      5. Multiplexers and Demultiplexers
      6. Adders
      7. Negators and Subtractors
    2. From Combinatorial to Sequential Logic
    3. Clocked Logic
      1. Clocked Flip-Flops
      2. Counters
      3. Sequencers
      4. Random-Access Memory
    4. Summary
    5. Exercises
    6. Further Reading
  18. 7. DIGITAL CPU DESIGN
    1. The Baby’s Programmer Interface
      1. Halting
      2. Constants
      3. Load and Store
      4. Arithmetic
      5. Jumps
      6. Branches
    2. Assemblers
    3. The Baby’s Internal Structures
      1. Registers
      2. Arithmetic Logic Unit
      3. Control Unit
    4. Putting It All Together
      1. Fetch
      2. Decode
      3. Execute
      4. Complete Baby Implementation
    5. Summary
    6. Exercises
    7. Further Reading
  19. 8. ADVANCED CPU DESIGN
    1. Number of User Registers
    2. Number of Instructions
    3. Duration of Instructions
    4. Different Addressing Modes
    5. Subroutines
      1. Stackless Architectures
      2. Stack Architectures
    6. Floating-Point Units
    7. Pipelining
      1. Hazards
      2. Hazard Correction
    8. Out-of-Order Execution
    9. Hyperthreading
    10. Summary
    11. Exercises
    12. Further Reading
  20. 9. INPUT/OUTPUT
    1. Basic I/O Concepts
    2. Buses
      1. Bus Lines
      2. The CPU-Bus Interface
    3. I/O Modules
      1. Control and Timing
      2. Error Detection
    4. I/O Module Techniques
      1. Polling
      2. Interrupts
      3. Direct Memory Access
    5. I/O Without Modules
      1. CPU I/O Pins
      2. Memory Mapping
      3. Bus Hierarchies
    6. Summary
    7. Exercises
    8. Further Reading
  21. 10. MEMORY
    1. The Memory Hierarchy
    2. Primary Memory
      1. Bytes and Endianness
      2. Memory Modules
      3. Random-Access Memory
      4. Read-Only Memory
    3. Caches
      1. Cache Concepts
      2. Cache Read Policies
      3. Cache Write Policies
      4. Advanced Cache Architectures
    4. Secondary and Offline Memory
      1. Tapes
      2. Disks
      3. Solid-State Drives
    5. Tertiary Memory
    6. Data Centers
    7. Summary
    8. Exercises
    9. Further Reading
  22. PART III. EXAMPLE ARCHITECTURES
  23. 11. RETRO ARCHITECTURES
    1. Programming in the 1980s Golden Age
      1. 8-Bit Era
      2. 16-Bit Era
    2. Working with the MOS 6502 8-Bit CPU
      1. Internal Subcomponents
      2. Programmer Interface
    3. 8-Bit Computer Design with the Commodore 64
      1. Understanding the Architecture
      2. Programming the C64
    4. Working with the Motorola 68000 16-Bit CPU
      1. Internal Subcomponents
      2. Programmer Interface
    5. 16-Bit Computer Design with the Commodore Amiga
    6. Retro Peripherals
      1. Cathode Ray Tube Displays
      2. User Input
      3. Serial Port
      4. MIDI Interfaces
    7. Summary
    8. Exercises
    9. Further Reading
  24. 12. EMBEDDED ARCHITECTURES
    1. Design Principles
      1. Single Purpose
      2. Reliability
      3. Mobility and Power
      4. Encapsulation
      5. Careful Debugging
    2. Microcontrollers
      1. CPU
      2. Memory
      3. Timers and Counters
    3. Embedded I/O
      1. Analog-Digital Conversion
      2. Embedded Serial Ports
      3. Inter-Integrated Circuit Bus
      4. Controller Area Network Bus
    4. Arduino
      1. The ATmega328 Microcontroller
      2. The Rest of the Arduino Board
      3. Programming Arduino
    5. Other CPU-Based Embedded Systems
      1. Atmel AVR Without the Arduino
      2. PIC Microcontrollers
      3. Digital Signal Processors
    6. Embedded Systems with No CPU
      1. Programmable Logic Controllers
      2. Embedded FPGAs
    7. Summary
    8. Exercises
    9. Further Reading
  25. 13. DESKTOP ARCHITECTURES
    1. CISC Design Philosophy
    2. Microprogramming
    3. x86 History
      1. Prehistory
      2. 16-Bit Classical Era
      3. 32-Bit Clone Wars Era
      4. 64-Bit Branding Era
    4. Programming x86
      1. Registers
      2. Netwide Assembler Syntax
      3. Segmentation
      4. Backward-Compatible Modes
    5. PC Computer Design
      1. The Bus Hierarchy
      2. Common Buses
      3. Standard Devices
    6. Summary
    7. Exercises
    8. Further Reading
  26. 14. SMART ARCHITECTURES
    1. Smart Devices
    2. RISC Philosophy
    3. RISC-V
      1. Understanding the Architecture
      2. Programming Core RISC-V
      3. Extending RISC-V
    4. Different RISC-V Implementations
    5. RISC-V Toolchain and Community
    6. Smart Computer Design
      1. Low-Power DRAM
      2. Cameras
      3. Touchscreens
    7. Summary
    8. Exercises
    9. Further Reading
  27. 15. PARALLEL ARCHITECTURES
    1. Serial vs. Parallel Thinking
    2. Single Instruction, Multiple Data on CPU
      1. Introduction to SIMD
      2. SIMD on x86
    3. SIMD on GPU
      1. GPU Architecture
      2. Nvidia GPU Assembly Programming
      3. SASS Dialects
      4. Higher-Level GPU Programming
    4. Multiple Instruction, Multiple Data
      1. MIMD on a Single Processor
      2. Shared-Memory MIMD
      3. MIMD Distributed Computing
    5. Instructionless Parallelism
      1. Dataflow Architectures
      2. Dataflow Compilers
      3. Hardware Neural Networks
    6. Summary
    7. Exercises
    8. Further Reading
  28. 16. FUTURE ARCHITECTURES
    1. The New Golden Age
      1. Open Source Architectures
      2. Atomic-Scale Transistors
      3. 3D Silicon Architectures
      4. 10,000-Year Memory
    2. Optical Architectures
      1. Optical Transistors
      2. Optical Correlators
      3. Optical Neural Networks
    3. DNA Architectures
      1. Synthetic Biology
      2. DNA Computing
    4. Neural Architectures
      1. Transistors vs. Ion Channels
      2. Logic Gates vs. Neurons
      3. Copper Wires vs. Chemical Signals
      4. Simple Machines vs. Cortical Columns
      5. Chips vs. Cortex
      6. Parallel vs. Serial Computation
    5. Quantum Architectures
      1. A Cartoon Version of Quantum Mechanics
      2. The Math Version of Quantum Mechanics
      3. Quantum Registers of Qubits
      4. Computation Across Worlds
      5. Practical Quantum Architectures
    6. Future Physics Architectures
    7. Summary
    8. Exercises
    9. Further Reading
  29. APPENDIX: OPERATING SYSTEM SUPPORT
    1. Concurrency
    2. Kernel Mode and User Mode
    3. Virtual Memory
    4. Device Drivers
    5. Loaders
    6. Linkers
    7. Extra Boot Sequence Stages
    8. Hypervisor Mode, Virtualization, and Containers
    9. Real-Time Operating Systems
    10. Speculative Execution Vulnerabilities
    11. Exercises
    12. Further Reading
  30. ACKNOWLEDGMENTS
  31. FIGURE CREDITS
  32. INDEX

Product information

  • Title: Computer Architecture
  • Author(s): Charles Fox
  • Release date: May 2024
  • Publisher(s): No Starch Press
  • ISBN: 9781718502864