0% found this document useful (0 votes)
93 views20 pages

Reserved: Basic Structure of Computers and Instruction Set

This document provides an overview of the basic structure of computers and instruction sets. It discusses the main components of a computer including the input unit, memory unit, arithmetic logic unit (ALU), output unit, and control unit. It also describes different types of computers such as microcomputers, laptops, workstations, supercomputers, and more. The document explains the basic computer structure including fetch, decode, and execute steps. It defines instruction set architecture and computer organization. The learning objectives and outcomes are also outlined.

Uploaded by

Juan
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)
93 views20 pages

Reserved: Basic Structure of Computers and Instruction Set

This document provides an overview of the basic structure of computers and instruction sets. It discusses the main components of a computer including the input unit, memory unit, arithmetic logic unit (ALU), output unit, and control unit. It also describes different types of computers such as microcomputers, laptops, workstations, supercomputers, and more. The document explains the basic computer structure including fetch, decode, and execute steps. It defines instruction set architecture and computer organization. The learning objectives and outcomes are also outlined.

Uploaded by

Juan
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/ 20

UNIT

01

D
Basic Structure of Computers

E
V
and Instruction Set

R
E
S
Names of Sub-Units
E
Basic Computer Structure, Computer Types, Functional Units, Basic Operational Concepts, Bus
R
Structures, Processor Clock, Basic Performance Equation, Clock Rate, Performance Measurement,
Machine Instructions, Numbers, Arithmetic Operations and Characters, Memory Location and
Addresses, Memory Operations, Instructions and Instruction Sequencing.
T
H

Overview
The unit begins by explaining the basic structure of computer. Further, it discusses the computer
IG

types, functional units, basic operational concepts. This unit explains the bus structures, processor
clock, basic performance equation, and clock rate. Next, the unit discusses the machine instructions.
The unit also discusses the number representation, arithmetic operations and character, memory
R

location and addresses. Towards the end, the unit explains the memory operations, instructions and
instruction sequencing.
Y
P

Learning Objectives
O

In this unit, you will learn to:


C

aa Explain the concept of basic computer structure


aa Describe the types and functional unit of computer
aa Defines the concept of machine instructions
aa Explain the arithmetic operation and memory operations
aa Describe the instructions and instruction sequencing
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

Learning Outcomes

At the end of this unit, you would:


aa Examine the concept of basic computer structure
aa Evaluate the knowledge about different types and functional unit of computer
aa Assess the role of bus structures, processor clock, basic performance equation, and clock rate
aa Evaluate the concept of one’s complement and two’s complement

D
aa Analyse the instructions and instruction sequencing

E
Pre-Unit Preparatory Material

V
http://www.ipsgwalior.org/download/computer_system_architecture.pdf

R
aa

E
1.1 Introduction
A computer is an electronic device which is used to perform a variety of operations on the basis of a set

S
of instructions called program. A computer takes input from the user in the form of data or instructions.
E
On receiving the instructions from the user, the computer processes the data and generates some output
and displays it to the user. When the computer processes data, it becomes information. A computer
R
performs a task in the same manner as we do our day-to-day activities.

1.2  Basic Computer Structure


T

In general, computer architecture encompasses three areas of computer design: computer hardware,
H

instruction set architecture, and computer organization. Electronic circuits, displays, magnetic and
optical storage media, and communication capabilities make up computer hardware.
IG

The instruction set, registers, memory management, and exception handling are all examples of
machine interfaces that are accessible to the programmer. CISC (Complex Instruction Set Computer)
and RISC (Reduced Instruction Set Computer) are the two basic techniques (Reduced Instruction Set
R

Computer).
Y

Computer organization refers to the high-level aspects of a design, such as the memory system, bus
structure, and internal CPU design.
P

1.2.1  Computer Types


O

A computer is a high-speed electronic calculating machine that accepts digital input, processes it
according to internally stored instructions (Programs), and outputs the result on a display device. The
C

computer’s internal working is represented in Figure 1:

Fetch the
instruction

Execute the Decode the


instruction instruction

Figure 1: Fetch, Decode and Execute steps in a Computer System

2 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

The different types of computers are:


zz Micro computer: A personal computer is one that is designed to satisfy the needs of a single person.
Access to a wide range of computer applications, including word processing, photo editing, e-mail,
and the internet.
zz Laptop computer: All of the components are combined into a single compact unit. It costs more than
a similar desktop computer. It’s also known as a Notebook.
zz Work station: A powerful desktop computer with specialized functions. Typically utilized for tasks
that necessitate a high level of processing speed. A conventional personal computer connected to a

D
LAN can also be used (local area network).
zz Super computer: A computer that is regarded as the world’s fastest. Used to complete activities that

E
would take other computers a long time to complete. Modeling weather systems, for example, or
genomic sequence.

V
zz Main frame: Large, expensive computer capable of processing data for hundreds or thousands of
users at the same time. Large amounts of data must be stored, managed, and processed in a reliable,

R
secure, and centralized manner.

E
zz Hand held: It’s also known as a PDA (Personal Digital Assistant). A pocket computer that operates
on batteries and may be used while holding the device in your hand. Appointment books, address

S
books, calculators, and notepads are all common uses.
zz E
Multi-core: Parallel computing platforms with many cores. In a single chip, there are many Cores or
computer elements. Sony Play Station, Core 2 Duo, i3, i7, and other common examples.
R
zz Note-book computers: These are compact and portable versions of PC.
T

1.2.2  Functional Units


In its most basic form, a computer consists of five functional units: an input unit, an output unit, a
H

memory unit, arithmetic and logic unit, and a control unit. The functional units of a computer system
are depicted in Figure 2:
IG
R

Input alu
Y

memory
P

output control
O

I/O processor
C

Figure 2: Basic Functional Units of a Computer


The description of these functional units is as follows:
zz Input Unit: The computer receives the instruction/information/data with the help of input devices.
The most common input device is the keyboard. When you press a key, one word or number is
converted into binary code and transmits it over a cable to memory or the CPU.

 3
JGI JAINDEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

zz Memory Unit: The memory unit holds the programme instructions (code), data, and computing
results, among other things. The following are the several types of memory units:
 Primary /Main Memory
 Secondary /Auxiliary Memory
Primary memory is a type of semiconductor memory that allows for fast access. The main memory
stores run-time programme instructions and operands. ROM and RAM are the two types of main
memory. BIOS, POST, and I/O Drivers are examples of system applications and firmware procedures
that are required to manage a computer’s hardware. RAM stands for read/write memory or

D
user memory, and it stores programme instructions and data during execution. Primary storage
is necessary, but it is inherently volatile and costly. Additional memory could be provided as an

E
auxiliary memory at a lower cost.
Secondary memory is utilized when huge volumes of data and programmes, especially information

V

that is accessed infrequently, must be kept.

R
zz Arithmetic and Logic Unit (ALU): Adder, comparator, and other logic circuits are used in ALU to
accomplish operations such as addition, multiplication, and number comparison.

E
zz Output Unit: These are the input unit’s polar opposites. Its primary function is to communicate the
processed results to the rest of the world.

S
zz Control Unit: It is the nerve centre that transmits messages to and senses the status of other units.
E
The control unit generates the real timing signals that govern data transfer between the input unit,
processor, memory, and output unit.
R
1.2.3  Basic Operational Concepts
T

A programme containing a list of instructions is stored in the memory to accomplish a certain task.
Individual instructions are transferred from memory to the processor, which then performs the actions.
H

Data that has to be saved is also saved in the memory.


IG

For example, Add LOCA, R0


The operand at memory location LOCA is added to the operand in register R0, and the sum is stored in
register. This instruction necessitates the completion of numerous steps, which are as follows:
R

zz The instruction is first retrieved from memory and entered into the processor.
Y

zz The LOCA operand is retrieved and appended to the contents of R0


Finally, the total is saved in the register R0.
P

zz

An ALU action is combined with a memory access operation in the previous add instruction. For
O

performance considerations, these two sorts of operations are done by different instructions in various
other types of computers.
C

Load LOCA, R1
Add R1, R0

Sending the address of the memory location to be accessed to the memory unit and providing the
relevant control signals initiates transfers between the memory and the processor. After that, the data
is moved to or from memory.

4 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

Figure 3 depicts how memory and the CPU can be linked. The processor has a number of registers in
addition to the ALU and control circuitry. These registers are utilized for a variety of reasons.

Main Memory

MAR MDR
Control

D
PC R0

E
R1
ALU
IR .

V
.
.

R
Rn-1
n General Purpose

E
Register

S
Figure 3: Connections Between the Processor and the Memory
E
The instruction register (IR) maintains track those instructions that are presently being performed.
Its output is provided to control circuits that generate timing signals to manage various processing
R
elements throughout a particular instruction’s execution.
The program counter (PC) is a customized register for keeping track of a program’s execution. It holds
T

the memory address of the next to be fetched and executed instruction.


H

The operating steps are as follows:


zz Programs are stored in memory and are often accessed via the I/P unit.
IG

zz When the PC is set to point at the program’s first instruction, the programme will begin to run.
zz The contents of the PC are copied to the MAR, and the memory receives a Read Control Signal.
R

zz The address word is read from memory and loaded into the MDR once the time required to access
the memory has elapsed.
Y

zz Now that the MDR’s contents have been transmitted to the IR, the instruction can be decoded and
executed.
P

zz If the instruction calls for an ALU operation, the required operands must be obtained.
O

zz A memory operand is retrieved by providing its address to MAR and starting a read cycle.
C

zz The operand is moved from the MDR to the ALU once it has been read from memory to the MDR.
zz The ALU can perform the desired action after one or two such repeated cycles.
zz The result of this operation is delivered to MDR if it is to be saved in memory.
zz The address of the result’s storage place is passed to MAR, and a write cycle is started.
zz The contents of PC are incremented so that PC points to the next to be executed instruction.

 5
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

1.2.4  Bus Structures


A bus is a collection of lines that act as a connecting path for multiple devices (one bit per line). Individual
parts must exchange data, address, and control information across a communication line or path, as
shown in Figure 4:

Input Output Memory Processor

D
E
V
Figure 4: Single Bus Structure

R
Processor to printer as an example. Using the concept of buffer registers to keep the content during the
transmission is a typical method. Only two units can use the bus at any given moment because it can

E
only be used for one transfer at a time. Multiple demands for the usage of a single bus are arbitrated
via bus control lines.

S
Single bus structure is: E
zz Low Cost
R
zz Very flexible for attaching peripheral devices

The performance of a multiple bus arrangement is unquestionably improved, but the cost is greatly
T

increased.
H

1.3 Performance
IG

The most essential indicator of a computer’s performance is how rapidly it can run programmes. The
architecture of a computer’s hardware influences the speed with which it runs programmes. It is vital
to design the compiler for optimal performance. In a coordinated manner, the machine instruction set
and the hardware.
R

The whole time it takes to run the programme is called elapsed time, and it is a measure of the computer
Y

system’s overall performance. The speed of the CPU, disc, and printer all have an impact. The processor
time is the amount of time it takes to execute an instruction.
P

The time taken by the processor is determined by the hardware used in the execution of each machine
O

instructions, much as the time it takes to execute a programme is affected by all of the components of a
computer system. The hardware consists of the CPU and memory, which are normally coupled by a bus.
C

On a single IC chip, the processor and a tiny cache memory can be created. Internally, the speed at
which the basic steps of instruction processing are performed on the chip is extremely rapid, and it
is significantly quicker than the speed at which the instruction and data are acquired from the main
memory. When the movement of instructions and data between the main memory and the processor is
limited, which is achieved by utilising the cache, a programme will run faster.
Consider the following scenario: In a programme loop, a set of instructions are performed repeatedly
over a short period of time. If these instructions are stored in the cache, they can be swiftly retrieved
during periods of frequent use. The same can be said for data that is used frequently.

6 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

1.3.1  Processor Clock


Clock is a timing signal that controls processor circuits. Clock cycles are regular time periods created
by the clock designer. To carry out a machine command, the processor separates the action into a series
of simple steps, each of which can be accomplished in a single clock cycle. One clock cycle’s length P is a
critical parameter that impacts processor performance.

1.3.2  Basic Performance Equation


The processor time component of the total elapsed time is now the focus of our attention. Let ‘T’ be

D
the amount of time it takes a processor to run a programme that has been prepared. In a high-level
programming language, a machine language object programme is generated by the compiler.

E
It relates to the source programme. Assume that the programme has completed its execution. N

V
machine cycle language instructions must be executed. The number N is a prime number. The number
of instructions executed is not always the same as the number of instructions written. In the object

R
programme, there are machine cycle instructions.
Depending on the input data utilised, some instructions may be executed multiple times, while others

E
may not be executed at all in the case of instructions inside a programme loop.

S
Assume that the average number of basic steps required to accomplish one machine cycle instruction
is S, and that each basic step takes one clock cycle to complete. The programme execution time is given
E
by if the clock rate is ‘R’ cycles per second.
R
N×S
T=
R
T

The basic performance equation is what it’s called.


H

It’s important to note that N, S, and R are not independent parameters, and changing one can have
an impact on the others. Only if the overall consequence is to reduce the value of T will adding a new
IG

feature to a processor’s architecture result in increased performance.

Pipelining and Super Scalar Operation


R

We presume that instructions are carried out in a sequential order. As a result, the value of S represents
Y

the total number of fundamental steps (or clock cycles) required to complete one instruction.
Pipelining, a technique that involves overlapping the execution of successive instructions, can result in
P

significant speed gains.


O

Consider Add R1 R2 R3
This sums R1 and R2’s contents and places the result in R3. The contents of R1 and R2 are first copied to
C

the ALU’s inputs. The sum is moved to R3 after the addition procedure is completed. While the addition
operation is being done, the CPU can read the following instruction from memory.
At the same time that the add instructions are sent to R3, the operand of that instruction, which also
utilises the ALU, can be supplied to the ALU inputs.
If all instructions are overlapped to the greatest extent possible, execution proceeds at the pace of one
instruction per clock cycle in the ideal scenario. Individual instructions still take a number of clock
cycles to finish. However, the effective value of S for the purpose of determining T is 1.

 7
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

If numerous instructions pipelines are built in the CPU, a higher level of concurrency can be attained.
This means that numerous functional units are employed to create parallel channels through which
different instructions can be executed in parallel.
As a result of this arrangement, several instructions can be started in one clock cycle. Superscalar
execution is the name for this kind of action.
The effective value of S can be decreased to less than one if it can be maintained for a long time during
programme execution. However, parallel execution must maintain logical correctness of programmes,
i.e., the results produced must be identical to those produced by sequential execution.

D
The execution of programme instructions in a sequential order Many processors are now constructed
in this manner.

E
V
1.3.3  Clock Rate
These are the two options for increasing the clock rate ‘R’, which are as follows:

R
1. Improving IC technology speeds up logical circuits, reducing the time it takes to complete basic

E
steps. This allows for a reduction in the clock period P and an increase in the clock rate R.
2. Reducing the amount of processing done in a single basic step allows the clock period P to be reduced.

S
However, if the acts that an instruction must execute remain constant, the number of basic steps
required may increase. E
With the exception of the time it takes to access the main memory, increases in the value ‘R’ that are
R
solely due to improvements in IC technology effect all elements of the processor’s operation equally. The
fraction of accesses to main memory is small when cache is present. As a result, most of the performance
benefit that would otherwise be gained by using faster technology can be realised.
T
H

Instruction Set – CISC & RISC


Simple instructions just require a few basic steps to complete. There are a lot of steps in complex
IG

instructions. A significant number of instructions may be required to complete a programming task on


a processor with only simple instructions.
R

This could result in a large ‘N’ value and a small ‘S’ value. Individual instructions that perform more
sophisticated processes, on the other hand, will require fewer instructions, resulting in a lower value
Y

of N and a higher value of S. It’s difficult to say whether one option is better than the other. However,
combining complicated instructions with pipelining (effective value of S 1) would result in the best
P

performance. In CPUs with basic instruction sets, however, efficient pipelining is much easier to achieve.
O

1.3.4  Performance Measurement


A benchmark is a regular job that is used to determine how well a CPU performs. A non-profit
C

organisation known as SPEC-System Performance Evaluation Corporation uses agreed-upon real-world


application programmes as benchmarks to measure the performance of computers. As a result, it gives
a computer’s performance as the time it takes to run a specified benchmark software. The following is
how the SPEC rating is calculated:

Running time on the reference computer


SPEC Rating =
Running time on the computer under test

8 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

1.4  Machine Instructions


Machine Instructions are commands or programmes encoded in machine code that can be recognised
and executed by a machine (computer). A machine instruction is a set of bytes in memory that instructs
the processor to carry out a certain task.
The CPU goes through the machine instructions in main memory one by one, doing one machine action
for each one. A machine language programme is a collection of machine instructions stored in main
memory.

D
A collection of instructions performed directly by a computer’s central processing unit is known as
machine code or machine language (CPU).

E
Each instruction performs a highly particular duty on a unit of data in a CPU register or memory, such
as a load, a jump, or an ALU operation. A set of such instructions make up any programme that is

V
directly executed by a CPU.

R
The general format of a machine instruction is:

E
[Label:]  Mnemonic  [Operand, Operand]  [; Comments]
The use of brackets denotes that a field is optional. The address of the first byte of the instruction in

S
which it appears is allocated to the label.
E
It must be followed by a colon (:). The placement of spaces is arbitrary, with the exception that at least
one space must be included; otherwise, there would be ambiguity. A semicolon “; ” begins the comment
R
field.
For example:
T

Here:  MOV  R5,#25H ;  load 25H into R5


H

1.4.1 Representation of Number
IG

Representing (or encoding) a number signifies expressing the number in binary form. The representation
of numbers is necessary for storing and manipulating the numbers efficiently. There are several ways to
represent integers in the binary form. Three binary representations of integers are listed below:
R

zz Signed and magnitude representation


Y

zz 1’s (or one’s) complement


2’s (or two’s) complement
P

zz

Let’s discuss each binary representation of integers in the following section.


O

Defining the Signed and Magnitude Representation


C

An integer may consist of one or more digits which indicate its magnitude and may have +ve or –ve sign.
Examples of integer are +13 or 39 and –12 or –18.
In a computer, numbers are represented in the binary form as bits without using any other symbol.
Various methods are used for binary representation of numbers. One such method is known as signed
and magnitude representation.

 9
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

In this method, the sign of a number is represented by using the leftmost bit of its binary equivalent,
which is called the Most Significant Bit (MSB). If the MSB is 0, then the sign of the number is + and if the
MSB is 1, then number sign is –.
For example, If a computer has a word size of 8 bits, then the positive number 17 in binary notation
would be represented as shown in Figure 5:

MSB is 0, which
represents the 0 0 0 1 0 0 0 1
positive sign

D
E
Figure 5: Representing a Positive Number(17) in Binary Notation
Similarly, the negative number 12 in binary notation would be represented as shown in Figure 6:

V
R
MSB is 1, which
represents the 1 0 0 0 1 1 0 0

E
negative sign

S
Figure 6: Representing a Negative Number (–12) in Binary Notation
E
In the sign and magnitude notation, if a word is represented by X bits, then the total numbers which can
be represented by X bits is 2X – 1. In the preceding example, a word is represented using 8 bits, where MSB
R
is reserved for representing sign.
Therefore, the number of maximum magnitude or value that can be represented by using 8 bits is 27 =
T

128 and the total numbers that can be represented by using 8 bits are 28 – 1 = 255. These numbers range
from –127 to 0 and 0 to +128.
H

One’s Complement
IG

In 1’s complement representation, a positive number is represented by its binary equivalent and a
negative number is represented by taking 1’s complement of its binary equivalent. The 1’s complement
of a binary number is derived by interchanging the positions of 1s and 0s in that number’s binary
R

equivalent. For example, 1’s complement of the binary number 1100 is 0011. This is called 1’s complement
because we can obtain the same number by subtracting the binary number 1100 from 1111.
Y

Let’s find out the binary equivalent of +5 and –5. In case of +5, 1’s complement (i.e. its binary equivalent)
P

is 0101. The 1’s complement of –5 is obtained by interchanging the positions of 1s and 0s in the binary
equivalent of 5. Therefore, the 1’s complement of –5 is 1010.
O

The maximum numbers that can be represented using 1’s complement is 2X – 1; where X is the number
C

of bits in a word. Therefore, an 8-bit word can have a maximum of 28 – 1 = 255 numbers. 1’s complement
can represent numbers in the range of +0(0000) and –0(1111).
For example, the 1’s complement of –12 is found in the following way:
1’s complement (or binary equivalent) of +12 = 0000 1100

By interchanging the positions of 1s and 0s in the binary equivalent +12, we get the 1’s complement of
–12 as 1111 0011.

10 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

Therefore, the 1’s complement of –12 is 1111 0011.


For example, find the 1’s complement of –12.
The required complement is found in the following way:
+12 = 0000 1100
Now, to obtain the 1’s complement, subtract 0000 1100 from 1111 1111

1 1 1 1 1111
– 0000 1100

D
1 1 1 1 0011

E
Two’s Complement
In 2’s complement representation, a positive number is represented by its binary equivalent and a

V
negative number is represented by taking the 2’s complement form of the binary equivalent of the
negative number. To get the 2’s complement of a number, we need to add 1 to the 1’s complement of the

R
same number.

E
For example, the 2’s complement form of 5 can be found in the following way:

S
The binary equivalent of 5 is 0101.
1’s complement of 0101 = 1010 E
2’s complement of 0101 = 1010
R
+1
1011
T

As 2’s complement form of 5 is 1011.


H

Therefore 5 and –5 can be represented as 0101 (binary equivalent) and 1011 (2’s complement of 5).
Alternative Method to Represent the 2’s Complement
IG

Another method to find the 2’s complement of a negative number is as follows:


1. Start traversing from the LSB (right to left) of the binary number until 1 is encountered. Note down
R

all the bits till 1, including 1.


Y

2. Take 1’s complement of the remaining bits.


3. Now, first write the complement of the remaining bits and then the bits separated from the binary
P

number in Step 1.
O

1.4.2  Binary Arithmetic


C

For performing various operations in digital computers and in other digital system, binary arithmetic is
mandatory. Binary arithmetic includes binary addition, subtraction, multiplication and division.
Let’s now learn about rules for performing each kind of operation in detail.

Binary Addition
As the name suggests, binary addition is used for performing addition of binary numbers.

 11
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

The rules for performing binary addition are shown in Table 1:

Table 1: Rules for performing Binary Addition

Case A B Sum(A+B) Carry


I 0 0 0 0
II 0 1 1 0
III 1 0 1 0

D
IV 1 1 0 1
In case IV, 1+1 will give 10. The 0 is retained in the same column while the 1 is carried to the next column.

E
Note that the binary addition of 1+1+1 is 11 in which 1 is retained in the same column and other 1 is

V
carried to the next column.
For example: Let’s perform binary addition on the two numbers 101112(2310) and 101101(4510).

R
Carry111111

E
0010111 (2310)

S
+ 0101101 (4510)
1000100 (6810)
E
R
Binary Subtraction
In binary subtraction, two binary numbers are subtracted. While performing subtraction, the smaller
number must be subtracted from a larger number.
T

The rules for performing binary subtraction are shown in Table 2:


H

Table 2: Rules for Performing Binary Subtraction


IG

Case A B Subtraction(A-B) Carry


I 0 0 0 0
II 1 0 1 0
R

III 1 1 0 0
Y

IV 0 1 0 1

For example: Let’s perform binary addition on the two numbers 101101(4510) and 101112(2310).
P

0100 1 0
O

0 1 0 1 100101 (4510)
– 0 0 1 0 1 1 1 (2310)
C

0 0 1 0 1 1 0 (2210)

Here, 0 becomes 102 after borrow which is equal to 2(decimal equivalent) and 12 (decimal equivalent) = 1,
therefore, 2 - 1 = 1 or 102 - 12 = 12 .

Binary Multiplication
In binary multiplication, the multiplication of binary digits is done similar to decimal numbers.

12 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

The rules for performing binary numbers are shown in Table 3:

Table 3: Rules for Performing Binary Multiplication


Case A B Multiplication(A*B)
I 0 0 0
II 0 1 0
III 1 0 0
IV 1 1 1

D
For example: Let’s perform binary multiplication on the two numbers 0101101(4510) and 00011002(1210).

E
0 1 0 1 1 0 1 (4510)

V
X 0 0 0 1 1 0 0 (1210)
0000000

R
0000000+

E
0101101 +
0101101 +

S
1 0 0 0 0 1 1 1 0 0 (54010)

Binary Division
E
R
In binary division of two numbers, the larger number is divided by the smaller. The rules of subtraction
and multiplication are obeyed while performing the division operation. The rules of binary division are
T

same as the rules of decimal number division. Let’s perform binary multiplication on the two numbers
01011012(4510) and 1012(510).
H

1 0 0 1
IG

101√1 0 1 1 0 1
-1 0 1
R

0 0 0 1 0 1
Y

-1 0 1
0 0 0
P

The quotient obtained after division is 10012 which is equivalent to 910.


O

1.4.3  Memory Location & Addresses


C

A computer’s memory stores number and character operands, as well as instructions. The memory is
made up of millions of storage cells, each of which can store a single bit of data with a value of 0 or 1.
Bits are rarely handled separately because they represent such a small quantity of information. The
standard method is to deal with them in groups of a predetermined size. The memory is designed in
such a way that a group of n bits can be stored or retrieved in a single, basic operation for this purpose.
A word of information is made up of n bits, with n being the length of the word.

 13
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

Figure 7 shows the memory of a computer:

n bits

First Word
Second Word

D
E
i th Word

V
R
E
Last Word

S
E
Figure 7: Memory Structure
R
In most cases, a number takes only one word. By providing its word address, it may be retrieved in
memory. Individual characters can also be retrieved using their byte addresses.
Many applications need the handling of variable-length character strings. The address of the byte
T

containing the string’s first character is used to identify the start of the string. The string’s characters
are stored in successive byte positions. The length of the string can be indicated in two ways. A special
H

control character with the meaning “end of string” is used as the last character in the string, or a
number representing the string’ length in bytes can be put in a separate memory storage address or
IG

CPU register. Memory is made up of several millions of storage cells, each of which can hold one piece
of information. In most cases, data is accessed in n-bit chunks. The number n stands for word length.
Figure 8 shows the 32-bit word length:
R

32 bits
Y

b31 b30 b1 b0
P

Sign bit: b31 = 0 for positive numbers


O

b31 = 1 for negative numbers


C

(a) A Signed integer

8 bits 8 bits 8 bits 8 bits

ASCII ASCII ASCII ASCII


Character Character Character Character

Figure 8: 32-bit Word Length

14 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN DEEMED-TO-BE UNIVERSITY

Addresses for each place are required to access information from memory, whether for one word or one
byte (8-bit). Memory space refers to the 2^k memory places in a k-bit address memory, namely 0 to (2^k-
1). Assigning unique addresses to individual bit places in the memory is impracticable.
The most feasible assignment is for consecutive addresses to refer to successive byte places in memory
(byte-addressable memory). The addresses of bytes are 0, 1, 2,... If a word is 32 bits long, the following
words are placed at locations 0, 4, 8,...

Big-Endian and Little-Endian Assignments

D
There are two methods for assigning byte addresses across words, namely, big-endian and little-endian.
Big-endian is the most significant bytes of the word are addressed with lower byte addresses. Little-

E
endian is the antithesis of Big-Endian. For the word’s fewer important bytes, lower byte addresses are
used. Figure 9 shows the Big-endian and Little-endian assignment:

V
Word

R
Address Byte Address Byte Address

0 0 1 2 3 0 3 2 1 0

E
4 4 5 6 7 4 7 6 5 4

S



E •


R
T

2k – 4 2k – 4 2k – 3 2k – 2 2k – 1 2k – 4 2k – 1 2k – 2 2k – 3 2k – 4

(a) Big-endian Assignment (a) Little-endian Assignment


H

Figure 9: Big-Endian and Little-Endian Assignment:


IG

When words begin at a byte address that is a multiple of the number of bytes in a word, they are said to
be aligned in memory.
R

zz 16-bit word: word addresses: 0, 2, 4,….


zz 32-bit word: word addresses: 0, 4, 8,….
Y

zz 64-bit word: word addresses: 0, 8, 16,….


P

1.4.4  Memory Operation


O

The memory stores both programme instructions and data operands. The processor control circuits
must cause the word (or words) holding the instruction to be moved from memory to the processor in
C

order for it to be executed.


Operands and results should be transmitted between the memory and the CPU. Hence, two basic
memory operations need to the executed: load (or read or fetch) and store (or Write).
The load operation copies the contents of a particular memory region and sends them to the processor.
The contents of the memory are unaffected.

 15
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

The processor initiates a Load operation by sending the address of the target place to memory and
requesting that its contents be read. The data stored at that address is read from the memory and sent
to the CPU.
The store operation copies data from the processor to a specified memory location, erasing the contents
of that location before. The processor transfers the address of the desired place, as well as the data to be
put into that position, to the memory.
In a single operation, an information item of one word or one byte can be transmitted from the CPU to
the memory. This is a transfer between the CPU register and the main memory.

D
Load (or Read or Fetch)

E
zz Make a copy of the material. The memory’s content remains constant.
zz Address – Load

V
zz The usage of registers is possible.

R
Store (or Write)
In memory, overwrite the material.

E
zz

zz Address and Data – Store

S
zz Registers can be used

1.4.5  Instructions and Instruction Sequencing


E
R
A computer programme is made up of a series of small processes such as adding two numbers, checking
for a specific condition, reading the instruction from the input unit, or sending a output to the output
unit, etc. A computer must be able to execute four different sorts of operations, which are as follows:
T

zz Data transfers between the memory and the processor registers


H

zz Arithmetic and logic operations on data


zz Program sequencing and control
IG

zz I/O transfers
There are two type of notation that is used in instruction sequencing. These notation are as follows:
R

zz Register transfer notation: Information is transferred from one computer place to another.
Memory locations, CPU registers, or registers in the I/O subsystem are all possible places that may
Y

be implicated in such transfers. We usually refer to a location by a symbolic name that represents
its hardware binary address.
P

zz Assembly language notation: Another way to express machine instructions and programmes is to
O

use notation. We utilise an assembly language format for this. The statement, for example, specifies
an instruction that causes the transfer indicated above, from memory address LOC to processor
C

register R1.

Move LOC, R1
The old values of register R1 are rewritten when this instruction is executed, while the contents of
LOC remain unaltered.
The assembly language line may be used to specify the second example of adding two integers in
processor registers R1 and R2 and storing their sum in R3.

Add R1, R2, R3

16 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

Conclusion 1.5 Conclusion

zz A computer is a high-speed electronic calculating machine that accepts digital input, processes it
according to internally stored instructions (Programs), and outputs the result on a display device.
zz In general, computer architecture encompasses three areas of computer design: computer hardware,
instruction set architecture, and computer organization.
zz A computer consists of five functional units: an input unit, an output unit, a memory unit, arithmetic
and logic unit, and a control unit.

D
zz The memory unit holds the programme instructions (Code), data, and computing results, among

E
other things.
zz A programme containing a list of instructions is stored in the memory to accomplish a certain task.

V
zz A bus is a collection of lines that act as a connecting path for multiple devices (one bit per line).

R
zz Clock is a timing signal that controls processor circuits.
Machine Instructions are commands or programmes encoded in machine code that can be

E
zz
recognised and executed by a machine (computer).

S
zz Representing (or encoding) a number signifies expressing the number in binary form.
zz Binary arithmetic includes binary addition, subtraction, multiplication and division.
E
R
1.6 Glossary

zz Computer: An electronic calculating machine that accepts digital input, processes it according to
T

internally stored instructions (Programs), and outputs the result on a display device.
H

zz Programme: It contains a list of instructions is stored in the memory to accomplish a certain task.
zz Bus: It is a collection of lines that act as a connecting path for multiple devices (one bit per line).
IG

zz Processor clock: It is a timing signal that controls processor circuits.


zz Machine instruction: It is a set of bytes in memory that instructs the processor to carry out a certain
task.
R

zz Workstations: A powerful desktop computer with specialized functions


Y

zz Memory Operation: The memory stores both programme instructions and data operands.
P

zz Numbers: Both positive and negative numbers must obviously be represented.


O

1.7  Self-Assessment Questions


C

A. Multiple Choice Questions


1. The bus used to connect the monitor to the CPU is ______
a. PCI bus
b. SCSI bus
c. Memory bus
d. Rambus

 17
JGI JAIN
DEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

2. Which of the following is a small, portable computer that can be powered by a power supply or a
battery?
a. Laptop computer b. Desktop computer
c. Workstation d. Super computer
3. Which of the following computer is also known as Personal Digital Assistant?
a. Laptop computer b. Mainframe computer
c. Handheld computer d. Super computer

D
4. A computer’s memory stores:
a. Number b. Character operands

E
c. Instructions d. All of these

V
5. A __________ is a collection of lines that act as a connecting path for multiple devices (one bit per
line).

R
a. Circuit b. Bus

E
c. Memory d. Processor
6. Clock cycles are regular time periods created by the ______________.

S
a. Programmer b. Circuit programmer
c. Clock designer
E d. CPU
R
7. Which of the following technique that involves overlapping the execution of successive instructions,
can result in significant speed gains?
a. Clock rate b. Pipelining
T

c. Throughput d. All of these


H

8. Which of the following is a collection of instructions performed directly by a computer’s central


processing unit?
IG

a. Machine code b. Processor language


c. Both a and b d. None of these
R

9. Which of the following is the binary representations of integers?


a. Signed and magnitude representation b. 1’s (or one’s) complement
Y

c. 2’s (or two’s) complement d. All of these


P

10. Which of the following is used to communicate the processed results to the rest of the world?
O

a. Input unit b. Output unit


c. Control unit d. None of these
C

B. Essay Type Questions


1. Different types of computers are used for different purposes. Discuss the different types of computers.
2. Discuss the functional units of a computer.
3. Machine instructions are commands or programmes encoded in machine code that can be
recognised and executed by a machine. Discuss.

18 
UNIT 01: Basic Structure of Computers and Instruction Set JGI JAIN
DEEMED-TO-BE UNIVERSITY

4. Encoding a number signifies expressing the number in binary form. What are the three binary
representations of integers?
5. The memory stores both programme instructions and data operands. Discuss the concept of memory
operations.

1.8 Answers AND HINTS FOR Self-Assessment Questions

A. Answers to Multiple Choice Questions

D
Q. No. Answer

E
1. b.  SCSI bus2. a. Laptop computer

V
3. c.  Handheld computer

R
4. d.  All of these
5. b. Bus

E
6. c.  Clock designer

S
7. b. Pipelining
8.
9.
a.  Machine code
d.  All of these
E
R
10. b.  Output unit
10. a.  Single bus
T

B. Hints for Essay Type Questions


H

1. The different types of computers are:


IG

 Micro Computer: A personal computer is one that is designed to satisfy the needs of a single
person. Access to a wide range of computer applications, including word processing, photo
editing, e-mail, and the internet.efer to Section Basic Computer Structure
R

2. In its most basic form, a computer consists of five functional units: an input unit, an output unit, a
memory unit, arithmetic and logic unit, and a control unit. Refer to Section Basic Computer Structure
Y

3. A machine instruction is a set of bytes in memory that instructs the processor to carry out a certain
P

task. The CPU goes through the machine instructions in main memory one by one, doing one machine
action for each one. A machine language programme is a collection of machine instructions stored
O

in main memory. Refer to Section Machine Instructions


4. The representation of numbers is necessary for storing and manipulating the numbers efficiently.
C

There are several ways to represent integers in the binary form. Three binary representations of
integers are listed below:
 Signed and magnitude representation
 1’s (or one’s) complement
 2’s (or two’s) complement
Refer to Section Machine Instructions

 19
JGI JAINDEEMED-TO-BE UNIVERSITY
Computer Organization and Architecture

5. The processor control circuits must cause the word (or words) holding the instruction to be moved
from memory to the processor in order for it to be executed. Operands and results should be
transmitted between the memory and the CPU. Hence, two basic memory operations need to the
executed: load (or read or fetch) and store (or Write). Refer to Section Machine Instructions

@ 1.9  Post-Unit Reading Material

zz https://www.studocu.com/in/document/psg-college-of-technology/computer-architecture/m-

D
morris-mano-solution-manual-computer-system-architecture/10775236
zz http://sites.alaqsa.edu.ps/ekhsharaf/wp-content/uploads/sites/333/2016/03/machine-instruction-

E
and-programs.pdf

V
1.10  Topics for Discussion Forums

R
Do the online research on the basics of computer and make a presentation on in-depth knowledge of

E
zz
internal working, structuring, and implementation of a computer system. Also, discuss the concept

S
cover in the presentation with your classmates.

E
R
T
H
IG
R
Y
P
O
C

20 

You might also like