Intro to Computer Systems

Chapter 1: Introduction

The Role of Hardware and Software

There is a complex interaction between the primitive level of computation that the hardware offers, and the end-user benefits that computer software provides. We'll look at an overview of these processing layers here, and see them in action in the later Operating Systems and Application Software chapters.

Hardware Services

At its simplest level, a computer system merely performs basic logic calculations on binary data. These basic operations are performed billions of times a second, allowing the system to complete operations of significance, as well as create an accessible means for people to perform these tasks.

A diagram showing input (from keyboards and disks), processing by the computer, and output (to screen or printer).

Computer hardware performs one of three tasks; processing, input, and output.


The bulk of computer processing is done by the "brain" of the system; a chip known as the Central Processing Unit (CPU). This chip receives a steady stream of instructions (and data for the instructions to process), completes those instructions and returns their results.

They are generally the most well-known parts of the computer, and feature prominently in marketing material. Typical computer processors in modern desktop machines are Intel's Core family and AMD's various processor families.


In order for the CPU to process data, there must be a source for it all -- this is the role of input hardware. Data input (from the perspective of the CPU) can come from many sources, and at various speeds; a computer keyboard might feed it with data at a few dozen words per minute, or a high-speed disk system could bombard the CPU with millions of data records each second.


Once calculations are completed, they must be stored -- either permanently or temporarily. Usually, computer programs store the results of their operations in memory, as it is the fastest storage medium. In the long term, such results are then stored to a more permanent location like a hard disk.

Sometimes the output isn't intended for permanent storage; for example, the computer might be calculating how to display a window on screen, or how to render a document onto a piece of paper. In this case, the results of that calculation would be fed directly to the screen (via the graphics processor), or to the printer.

Specialist Hardware

In most computers, some processing burden is relieved from the CPU and moved towards chips more suited to the task known as co-processors. This provides two benefits; not only is the CPU more free to execute other instructions, but the specialist chips often do a much better job of these operations.

A Historical Perspective

Early CPUs were not very fast at complicated mathematics known as floating-point operations. The math co-processor was a processing unit that could only process complicated mathematics, but perform them much faster than the CPU could.

By installing a math co-processor into a computer system, such tasks were diverted to the co-processor for a significant overall speed gain. Modern CPUs include circuitry to perform these complicated "floating-point" mathematics tasks that were once left to a co-processor.

The most common example of co-processing in today's computers is in graphics processing: add-in boards containing GPUs (Graphics Processing Units) can process 3D visual effects and other graphics operations much faster than any general-purpose CPU. Common examples of such chips in use today include nVidia's GeForce and AMD's RADEON families of graphics processors.

Other recent examples of co-processing are Physics Processing Units, a processor tailored to the task of calculating physics problems. The most common application of these co-processors are in modern video game consoles and high end gaming-specific graphics cards.

The Operating System

The operating system provides a layer between these hardware primitives and the end-user software applications, and provides a consistent method for applications to call upon the hardware. They also take care of many housekeeping tasks, such as how the memory and disk resources are to be managed, or for scheduling which programs have control of the computer at any one time.

Application Requirements

It is said that applications are written to a particular platform: for example, a "Windows program" requires Microsoft's Windows operating system to work.

Application software 'sits' on top of the operating system software layer, which provides a convenient method for accessing the underlying hardware.
Application software 'sits' on top of the operating system software layer, which provides a convenient method for accessing the underlying hardware.

What this means is that the application has been written to interoperate with the application services that the particular operating system provides. Modern operating systems are often rich in what kinds of functionality they provide, which include (but are not limited to):


Earlier in the chapter, a big deal was made about a computer being Turing-complete; that is, one that can successfully perform any kind of logic operation. Based on this, it is technically possible for one Turing-complete machine to act as if it were another one. This process is called emulation. This is a useful feature, as it allows computers to pretend that hardware exists.

For example, an application program might make some advanced graphics calls that require the use of a specialist graphics processor. If that processor isn't present in the system, it can emulate that processor and still fulfil the task.

Emulation does have a negative side-effect: it is very slow. It is not uncommon for an emulated environment to be many times slower than the 'real' version. This is because although two machines may be capable of similar tasks, there are underlying architectural differences which make working exactly alike quite cumbersome.

An Example: Apple's Macintosh

The most common example of emulation in modern desktop computer systems has been on Apple's legacy Macintosh platform, which runs on Motorola's 68000 series, or PowerPC processors. Software has been available from many vendors which has allowed Macintosh computers to emulate an (Intel x86 processor-based) IBM PC computer.

The operating system itself also contains significant emulation; throughout the history of the Macintosh platform, there have been two changes to the underlying architecture which were fundamentally incompatible: 68000 to PowerPC, and then PowerPC to Intel x86.

The most recent of these changes occurred late in 2005 when Apple changed processor vendors from IBM (PowerPC) to Intel (x86)-- chips which are completely incompatible. To ensure that the transition from one architecture to the other was as smooth as possible, they developed an emulator called Rosetta which allows software designed for the IBM chips to run on Intel processors.