Chapter 2 - PC Components

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

CmpSc 122: Computer Organization and Assembly Language Chapter II.

PC Components

Chapter - 2
PC Components

I. Introduction

A low-level language is a type of programming language that contains instructions


written in a form close to computer language or a form recognized by a computer. Unlike
high-level languages used in software development, low-level code is often obscure and hard to
read and understood by humans. There are two common types of low-level programming
languages : machine language and assembly language.
Machine language is the lowest level of computer language consisting of binary codes,
often produced by compiling high-level source code for a specific processor. Software
developers do not need to look and manipulate the machine code except for systems’
programmers. System programmers build system software such as compilers and operating
systems, and they need to view and work with the machine code.
Assembly language is the next lowest programming language to machine language.
Unlike high-level programming language that is generally portable across multiple systems,
assembly language is a programming language for a computer or other devices specific to
particular computer architecture. An Assembly language source code is converted into
executable machine code by a utility program referred to as an assembler.
Writing an assembly language program requires knowledge of the PC hardware and the
details of various instruction sets. This book presumes that the students have sufficient
experience dealing with some of the underlying hardware such as bits and bytes, number
systems, number system representations, and number system arithmetic.

II. PC hardware
A computer consists of a set of components or modules of three basic types: processor,
memory, and I/O that communicate with each other. The components are connected through a
bus, a communication pathway connecting two or more devices (see Figure 1). It transfers data
between the processor, memory, and external devices.

MMSU - Department of Computing and Information Sciences // SdelaCruz


CmpSc 122: Computer Organization and Assembly Language Chapter II. PC Components

Figure 1. Components of the computer and their interconnections


The system bus, such as the control bus, carries the intent of the processor that it wants to
read or to write. Memory behaves in response to this signal from the processor, such that If the
processor wishes to read, but memory intends to write, there will be no communication or useful
flow of information. Both must be synchronized as a speaker speaks, and the listener
PROCESSOR MEMORY I/O listens. If both talk simultaneously or both listen, there will be no
communication. This precise synchronization between the processor and the memory is the
responsibility of the control bus.

III. The Processor


The central processing unit or CPU of the computer is based on the Intel 8086 family that
is responsible for executing the instruction and processing of data. Different processors vary in
terms of speed and capacity of memory, registers, and data bus (refer to the list of processors
below). All processor’s operations are synchronized and controlled by an internal clock.

8088. Consists of a 16-bit register and an 8-bit data bus and can address up to 1 million bytes of
internal memory. The registers in this processor process two bytes at a time, while the data bus
can transfer only one byte at a time.

8086. Consists of a 16-bit register and a 16-bit data bus and can address up to 1 million bytes of
internal memory.

80286. Consists of a 16-bit register and a 16-bit data bus and can address up to 16 million bytes
of internal memory. The processor operates in a real mode or protected mode, which enables an
operating system to perform multitasking and to protect them from each other

80386. Consists of a 32-bit register and a 32-bit data bus and can address up to 4 billion bytes of
internal memory. The processor operates on protected mode and supports virtual mode, where it
can swap a portion of memory onto disk.

80486. Consists of a 32-bit register, a 32-bit data bus, and a high-speed cache memory connected
to the processor through the bus. The cache memory stores a copy of essential instructions and
data. A check to the cache is made before the processor attempts to read the main memory

Pentium. Consists of a 32-bit register, a 64-bit data bus, and a separate caches for the data and
memory. The processor can decode and execute more than one instruction per clock cycle.

Pentium II and III. Consist of a Dual Independent Bus design that provides separate paths to
the system cache and memory. The processors are connected to a cache through a 64-bit wide
bus.

MMSU - Department of Computing and Information Sciences // SdelaCruz


CmpSc 122: Computer Organization and Assembly Language Chapter II. PC Components

IV. Internal Memory

The random access memory (RAM) and the read-only memory (ROM) encompassed the
internal memory on the PC. Typically, an internal memory consists of N words of equal length.
Each word in memory is numbered or assigned a unique numerical address (0, 1, . ., N-1), which
can be read from or written into the memory.

V. Basic Measure of Computer Performance

Computer performance is the amount of work accomplished by a computer system. The


word performance in computer performance means “How well is the computer doing the work it
is supposed to do?”. It basically depends on response time, throughput and execution time of a
computer system.

Response time is the time from start to completion of a task. This also includes:
● Operating system overhead.
● Waiting for I/O and other processes
● Accessing disk and memory
● Time spent executing on the CPU or execution time.

Throughput is the total amount of work done in a given time.

CPU execution time is the total time a CPU spends computing on a given task. It also excludes
time for I/O or running other programs. This is also referred to as simply CPU time.

Performance is determined by execution time as performance is inversely proportional to


execution time.
Performance = (1 / Execution time)

And,
(Performance of A / Performance of B)
= (Execution Time of B / Execution Time of A)

If given that Processor A is faster than processor B, that means execution time of A is less than
that of execution time of B. Therefore, performance of A is greater than that of B.

MMSU - Department of Computing and Information Sciences // SdelaCruz


CmpSc 122: Computer Organization and Assembly Language Chapter II. PC Components

Example –

Machine A runs a program in 100 seconds, Machine B runs the same program in 125 seconds.

(Performance of A / Performance of B)
= (Execution Time of B / Execution Time of A)
= 125 / 100 = 1.25

That means machine A is 1.25 times faster than Machine B.


And, the time to execute a given program can be computed as:
Execution time = CPU clock cycles x clock cycle time

Since clock cycle time and clock rate are reciprocals, so,
Execution time = CPU clock cycles / clock rate

The number of CPU clock cycles can be determined by,


CPU clock cycles
= (No. of instructions / Program ) x (Clock cycles /Instruction)
= Instruction Count x CPI

Which gives,
Execution time
= Instruction Count x CPI x clock cycle time
= Instruction Count x CPI / clock rate

The units for CPU Execution time are:

How to Improve Performance?


To improve performance you can either:
● Decrease the CPI (clock cycles per instruction) by using new Hardware.
● Decrease the clock time or Increase clock rate by reducing propagation delays or by use
pipelining.
● Decrease the number of required cycles or improve ISA or Compiler.

MMSU - Department of Computing and Information Sciences // SdelaCruz


CmpSc 122: Computer Organization and Assembly Language Chapter II. PC Components

MMSU - Department of Computing and Information Sciences // SdelaCruz

You might also like