0% found this document useful (0 votes)
8 views4 pages

Chapter 2 - Part 1

Chapter 2 discusses computer organization and architecture, emphasizing the principle that tasks performed by software can also be executed by hardware and vice versa. It defines computer architecture as the attributes visible to programmers and computer organization as the operational units and interconnections that realize these specifications. The chapter also outlines the main components of a computer, including the processor, memory, and input/output mechanisms, and presents a hierarchy of computer systems from user applications down to digital logic.

Uploaded by

hwttryd8hr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Chapter 2 - Part 1

Chapter 2 discusses computer organization and architecture, emphasizing the principle that tasks performed by software can also be executed by hardware and vice versa. It defines computer architecture as the attributes visible to programmers and computer organization as the operational units and interconnections that realize these specifications. The chapter also outlines the main components of a computer, including the processor, memory, and input/output mechanisms, and presents a hierarchy of computer systems from user applications down to digital logic.

Uploaded by

hwttryd8hr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Chapter 2: Computer Organisation and Architecture

Introduction
Computer scientists design algorithms that usually are implemented as programs written in some
computer language, such as Java or C++. But what makes the algorithm run? Another algorithm, of
course! And another algorithm runs that algorithm, and so on until you get down to the machine
level, which can be thought of as an algorithm implemented as an electronic device. Thus, modern
computers are actually implementations of algorithms that execute other algorithms. This chain of
nested algorithms leads us to the following principle:
Principle of equivalence of hardware and software: Any task done by software can also be done
using hardware, and any operation performed directly by hardware can be done using software.
A special-purpose computer can be designed to perform any task, such as word processing, budget
analysis, or playing a friendly game of Tetris. Accordingly, programs can be written to carry out the
functions of special purpose computers, such as the embedded systems situated in your car or
microwave. There are times when a simple embedded system gives us much better performance
than a complicated computer program, and there are times when a program is the preferred
approach. The principle of equivalence of hardware and software tells us that we have a choice. Our
knowledge of computer organization and architecture will help us to make the best choice.

1.1Definitions
In describing computers, a distinction is often made between computer architecture and computer
organization. Although it is difficult to give precise definitions for these terms, a consensus exists
about the general areas covered by each.
Computer architecture refers to those attributes of a system visible to a programmer or, put
another way, those attributes that have a direct impact on the logical execution of a program. A
term that is often used interchangeably with computer architecture is instruction set architecture
(ISA). The ISA defines instruction formats, instruction opcodes, registers, instruction and data
memory; the effect of executed instructions on the registers and memory; and an algorithm for
controlling instruction execution. Studying computer architecture helps us to answer the question:
How do I design a computer?
Computer organization refers to the operational units and their interconnections that realize the
architectural specifications. Examples of architectural attributes include the instruction set, the
number of bits used to represent various data types (e.g., numbers, characters), I/O mechanisms,
and techniques for addressing memory. Organizational attributes include those hardware details
transparent to the programmer, such as control signals; interfaces between the computer and
peripherals; and the memory technology used. Computer organization helps us to answer the
question: How does a computer work?

1.2 The Main Components of a Computer


At the most basic level, a computer is a device consisting of three pieces:
1. A processor (CPU, or central processing unit) to interpret and execute programs.
2. A memory to store both data and programs.
3. A mechanism for transferring data to and from the outside world.

The Processor

The processor consists of an arithmetic logic unit (ALU, to perform computations and make decisions)
and a control unit (to act as a “traffic police officer” directing data to correct locations). It also contains
very special storage locations called registers; these registers hold data that the CPU needs to access
quickly. When a program is running, the CPU executes instructions found in memory.

Memory

Memory is used to store anything that the computer needs. There are two types of memory: (1) long-
term memory, such as disk drives and flash drives, which stores data even when the power is off; and (2)
temporary memory, which loses data when it loses power, and includes registers and RAM. Think of
temporary memory as that space needed by the processor to store information it is currently working
on, and long-term memory as space to store data needed in the future. Typically memory is
“hierarchical,” meaning that there are different levels of memory, varying in size and speed. The goal of
this memory hierarchy is to give the best performance at the lowest cost. For example, a hard drive
provides a large, inexpensive place to store long-term data, whereas cache is a small, but fast and
expensive type of memory that stores data being used most often. By accessing the cache, the CPU can
read and write data quickly without bogging down the entire system.

The ALU must be connected to the registers, and both must be connected to the memory; this is done
by a special pathway called a bus. The collection of ALU, registers, and bus is called a datapath, an
extremely important component of any computer, because it is the hardware that is ultimately
responsible for running programs.

Input/Output
A computer would do us no good if we couldn’t give it information and get results in return.
Input/output components, such as keyboards, mice, monitors, printers, web cameras, scanners, graphics
tablets, and thumb drives, are all examples of devices that allow us to communicate with the computer.

1.3 Computer systems


Although a computer is composed of hardware, typically, we refer to the combination of hardware
and software as a computer system. The most important software is system software, which
includes the operating system. System software is the collection of programs that allow you to use
your computer. This type of software integrates closely with the hardware of your system, thus
becoming the interface between you and the computer hardware. Without system software, your
computer would be useless. Other software includes application software (such as programs for
email or word processing) and utility software (such as programs designed to clean up your hard
drive or software designed to protect your computer while on the internet). Both application
software and utility software use the system software to communicate with the hardware,
reiterating how important system software really is.
When discussing computer systems, it is also important to consider any peripheral devices
connected to the main computer hardware as part of that system. Keyboards, mice, printers,
monitors, scanners, and speakers are examples of peripherals you have probably used. In fact, your
tablet, smartphone, and smartwatch can be considered peripherals as well, because they can
connect easily to your computer and become part of the system. The difference between these
latter devices and the others is that your tablet, phone, and watch can typically run without being
connected to anything else.

1.4 Computer Hierarchy Levels


The computer can be viewed as a hierarchy of levels, in which each level has a specific function and
exists as a distinct hypothetical machine. We call the hypothetical computer at each level a virtual
machine. Each level’s virtual machine executes its own particular set of instructions, calling upon
machines at lower levels to carry out the tasks when necessary. Figure 1.1 shows the commonly
accepted layers representing the abstract virtual machines.

FIGURE 1.1 The Abstraction Levels of Modern Computing Systems


Level 6, the User Level, is composed of applications and is the level with which everyone is most
familiar. At this level, we run programs such as word processors, graphics packages, or games. The
lower levels are nearly invisible from the User Level.
Level 5, the High-Level Language Level, consists of languages such as C, C++, Fortran, Lisp, Pascal,
and Prolog. These languages must be translated (using either a compiler or an interpreter) to a
language the machine can understand. Compiled languages are translated into assembly language
and then assembled into machine code. (They are translated to the next lower level.) The user at
this level sees very little of the lower levels. Even though a programmer must know about data types
and the instructions available for those types, he or she need not know about how those types are
actually implemented.
Level 4, the Assembly Language Level, encompasses some type of assembly language. As previously
mentioned, compiled higher-level languages are first translated to assembly, which is then directly
translated to machine language. This is a one-to-one translation, meaning that one assembly
language instruction is translated to exactly one machine language instruction. By having separate
levels, we reduce the semantic gap between a high-level language, such as C++, and the actual
machine language (which consists of 0s and 1s).
Level 3, the System Software Level, deals with operating system instructions. This level is responsible
for multiprogramming, protecting memory, synchronizing processes, and various other important
functions. Often, instructions translated from assembly language to machine language are passed
through this level unmodified.
Level 2, the Instruction Set Architecture (ISA), or Machine Level, consists of the machine language
recognized by the particular architecture of the computer system. Programs written in a computer’s
true machine language on a hardwired computer can be executed directly by the electronic circuits
without any interpreters, translators, or compilers.
Level 1, the Control Level, is where a control unit makes sure that instructions are decoded and
executed properly and that data is moved where and when it should be. The control unit interprets
the machine instructions passed to it, one at a time, from the level above, causing the required
actions to take place.
Level 0, the Digital Logic Level, is where we find the physical components of the computer system:
the gates and wires. These are the fundamental building blocks, the implementations of the
mathematical logic, that are common to all computer systems.

You might also like