0% found this document useful (0 votes)
179 views73 pages

Unit 1

This document provides an overview of computer architecture and organization. It discusses the difference between computer architecture and organization, with architecture dealing with functional requirements and organization dealing with how components are structured. The document outlines the main functional units of a computer system including the input, central processing, memory, arithmetic/logical, control, and output units. It provides details on the basic operational concepts of how a computer accepts input, processes and stores information, and provides output.

Uploaded by

Rohan Mehra
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)
179 views73 pages

Unit 1

This document provides an overview of computer architecture and organization. It discusses the difference between computer architecture and organization, with architecture dealing with functional requirements and organization dealing with how components are structured. The document outlines the main functional units of a computer system including the input, central processing, memory, arithmetic/logical, control, and output units. It provides details on the basic operational concepts of how a computer accepts input, processes and stores information, and provides output.

Uploaded by

Rohan Mehra
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/ 73

Computer Architecture

B.Tech. AI
2022_23
Dr. Sumita Nainan

Dr. Sumita Nainan


UNIT 1
 Overview
 General Organization and Architecture
 Structural/functional view of a computer, Computer functional components.
 Number system
 Decimal, Binary, Hexadecimal notations and problems, Conversions using 1s and 2s
complement

Dr. Sumita Nainan


Computer System

Dr. Sumita Nainan


What is Computer Architecture and
Organization?
 In general terms, the Architecture of a computer system can be considered as a catalogue
of tools or attributes that are visible to the user such as instruction sets, number of bits
used for data, addressing techniques, etc.
 Computer Architecture is a functional description of requirements and design
implementation for the various parts of a computer. It deals with the functional behavior of
computer systems. It comes before the computer organization while designing a computer.

 Whereas, Organization of a computer system defines the way system is structured so that
all those catalogued tools can be used. The significant components of Computer
organization are ALU, CPU, memory and memory organization.
 Computer Organization comes after the decision of Computer Architecture first. Computer
Organization is how operational attributes are linked together and contribute to realizing
the architectural specification. Computer Organization deals with a structural relationship.

Dr. Sumita Nainan


Difference between Comp. Architecture and Comp Organization

Dr. Sumita Nainan


Functional Units of Digital System
 A computer organization describes the functions and design of the various units of a
digital system.
 A general-purpose computer system is the best-known example of a digital system.
Other examples include telephone switching exchanges, digital voltmeters, digital
counters, electronic calculators and digital displays.
 Computer architecture deals with the specification of the instruction set and the
hardware units that implement the instructions.
 Computer hardware consists of electronic circuits, displays, magnetic and optic
storage media and also the communication facilities.
 Functional units are a part of a CPU that performs the operations and calculations
called for by the computer program.
 A computer consists of five main components namely,
 1. Input unit 2. Central Processing Unit 3. Memory unit Arithmetic & logical unit,
4. Control unit and an 5. Output unit.

Dr. Sumita Nainan


Evolution

Dr. Sumita Nainan


Functional Units of Digital System Cont…

Dr. Sumita Nainan


Functional Units of Digital System Cont…
 Input unit
 Input units are used by the computer to read the data. The most commonly used
input devices are keyboards, mouse, joysticks, trackballs, microphones, etc.
 However, the most well-known input device is a keyboard. Whenever a key is
pressed, the corresponding letter or digit is automatically translated into its
corresponding binary code and transmitted over a cable to either the memory or
the processor.

 Central processing unit


 Central processing unit commonly known as CPU can be referred as an electronic
circuitry within a computer that carries out the instructions given by a computer
program by performing the basic arithmetic, logical, control and input/output
(I/O) operations specified by the instructions.

Dr. Sumita Nainan


Functional Units of Digital System Cont…
 Memory unit
 The Memory unit can be referred to as the storage area in which programs are
kept which are running, and that contains data needed by the running programs.
 The Memory unit can be categorized in two ways namely, primary memory and
secondary memory.
 It enables a processor to access running execution applications and services that
are temporarily stored in a specific memory location.
 Primary storage is the fastest memory that operates at electronic speeds. Primary
memory contains a large number of semiconductor storage cells, capable of
storing a bit of information. The word length of a computer is between 16-64
bits.
 It is also known as the volatile form of memory, means when the computer is shut
down, anything contained in RAM is lost.

Dr. Sumita Nainan


Functional Units of Digital System Cont…
 Memory unit
 Cache memory is also a kind of memory which is used to fetch the data very
soon. They are highly coupled with the processor.
 The most common examples of primary memory are RAM and ROM.
 Secondary memory is used when a large amount of data and programs have
to be stored for a long-term basis.
 It is also known as the Non-volatile memory form of memory, means the data
is stored permanently irrespective of shut down.
 The most common examples of secondary memory are magnetic disks,
magnetic tapes, and optical disks.

Dr. Sumita Nainan


Functional Units of Digital System Cont…

 Arithmetic & logical unit


 Most of all the arithmetic and logical operations of a computer are executed in
the ALU (Arithmetic and Logical Unit) of the processor. It performs arithmetic
operations like addition, subtraction, multiplication, division and also the
logical operations like AND, OR, NOT operations.
 Control unit
 The control unit is a component of a computer's central processing unit that
coordinates the operation of the processor. It tells the computer's memory,
arithmetic/logic unit and input and output devices how to respond to a
program's instructions.
 The control unit is also known as the nerve center of a computer system.
 Let's us consider an example of addition of two operands by the instruction
given as Add A, R. This instruction adds the contents of register A to the
operand in the register R and places the sum in the register A (destination,
source). This instruction internally performs several steps.
Dr. Sumita Nainan
Functional Units of Digital System Cont…

 Output Unit
 The primary function of the output unit is to send the processed results
to the user.
 Output devices display information in a way that the user can
understand.
 Output devices are pieces of equipment that are used to generate
information or any other response processed by the computer.
 These devices display information that has been held or generated within
a computer.
 The most common example of an output device is a monitor.

Dr. Sumita Nainan


Basic Operational Concepts…
 The operation of a computer can be summarized as
follows:
 The computer accepts information in the form of programs and data through an
input unit and stores it in the memory.

 Information stored in the memory is fetched under program control into an


arithmetic and logic unit, where it is processed.

 Processed information leaves the computer through an output unit.

 All activities in the computer are directed by the control unit.


Dr. Sumita Nainan
Basic Operational Concepts cont….

 The primary function of a computer system is to execute a program, sequence


of instructions. These instructions are stored in computer memory.

 These instructions are executed to process data which are already loaded in the
computer memory through some input devices.

 After processing the data, the result is either stored in the memory for further
reference, or it is sent to the outside world through some output port.

 To perform the execution of an instruction, in addition to the arithmetic logic


unit, and control unit, the processor contains a number of registers used for
temporary storage of data and some special function registers.

Dr. Sumita Nainan


Basic Operational Concepts Cont…
 The special function registers include program counters (PC), instruction
registers (IR), memory address registers (MAR) and memory data registers
(MDR).

 The Program counter is one of the most critical registers in CPU.

 The Program counter monitors the execution of instructions. It keeps track on


which instruction is being executed and what the next instruction will be.

 The instruction register IR is used to hold the instruction that is currently being
executed.

Dr. Sumita Nainan


Basic Operational Concepts Cont…

 The contents of IR are available to the control unit, which generate the
timing signals that control, the various processing elements involved in
executing the instruction.

 The two registers MAR and MDR are used to handle the data transfer
between the main memory and the processor.

 The MAR holds the address of the main memory to or from which data is
to be transferred.

 The MDR contains the data to be written into or read from the addressed
word of the main memory.

Dr. Sumita Nainan


BASIC OPERATIONAL CONCEPTS
Memory and the processor Interconnection

Dr. Sumita Nainan


Basic Operational Concepts Cont…

 Whenever the processor is asked to communicate with devices, we say that the
processor is servicing the devices. The processor can service these devices in
one of the two ways.

 One way is to use the polling routine, and the other way is to use an interrupt.

 Polling enables the processor software to check each of the input and output
devices frequently. During this check, the processor tests to see if any devices
need servicing or not.

 Interrupt method provides an external asynchronous input that informs the


processor that it should complete whatever instruction that is currently being
executed and fetch a new routine that will service the requesting device.
Dr. Sumita Nainan
General System Architecture…
 In Computer Architecture, the General System Architecture is divided into two major
classification units.

 Store Program Control Concept


 Flynn's Classification of Computers

Dr. Sumita Nainan


General System Architecture…

Dr. Sumita Nainan


General System Architecture…
 Store Program Control Concept
 The term Stored Program Control Concept refers to the storage of instructions in
computer memory to enable it to perform a variety of tasks in sequence or intermittently.
 The idea was introduced in the late 1040s by John von Neumann who proposed that a
program be electronically stored in the binary-number format in a memory device so that
instructions could be modified by the computer as determined by intermediate
computational results.
 ENIAC (Electronic Numerical Integrator and Computer) was the first computing system
designed in the early 1940s. It was based on Stored Program Concept in which machine use
memory for processing data.
 Stored Program Concept can be further classified in three basic ways:
 Von-Neumann Model
 General Purpose System
 Parallel Processing

Dr. Sumita Nainan


General System Architecture-Von-Neumann
Model
 Von-Neumann proposed his computer
architecture design in 1945 which was later
known as Von-Neumann Architecture. It consisted
of a Control Unit, Arithmetic, and Logical
Memory Unit (ALU), Registers and
Inputs/Outputs.
 Von Neumann architecture is based on the
stored-program computer concept, where
instruction data and program data are stored in
the same memory. This design is still used in
most computers produced today.
 A Von Neumann-based computer:
 Uses a single processor
 Uses one memory for both instructions and data.
 Executes programs following the fetch-decode-
execute cycle

Dr. Sumita Nainan


General System Architecture-Von-Neumann
Model
 General Purpose System
 The General Purpose Computer System is the
modified version of the Von-Neumann
Architecture. In simple words, we can say
that a general purpose computer system is a
modern day architectural representation of
Computer System.
 The CPU (Central Processing Unit) consists of
the ALU (Arithmetic and Logic Unit), Control
Unit and various processor registers.
 The CPU, Memory Unit and I/O subsystems
are interconnected by the system bus which
includes data, address, and control-status
lines.
 The following image shows how CPU, Memory
Unit and I/O subsystems are connected
through common single bus architecture.

Dr. Sumita Nainan


General System Architecture-Von-Neumann
Model
 Parallel Processing
 Parallel processing can be described as a class of techniques which enables the system to
achieve simultaneous data-processing tasks to increase the computational speed of a
computer system.
 A parallel processing system can carry out simultaneous data-processing to achieve faster
execution time. For instance, while an instruction is being processed in the ALU
component of the CPU, the next instruction can be read from memory.
 The primary purpose of parallel processing is to enhance the computer processing
capability and increase its throughput, i.e. the amount of processing that can be
accomplished during a given interval of time.
 A parallel processing system can be achieved by having a multiplicity of functional units
that perform identical or different operations simultaneously. The data can be distributed
among various multiple functional units.

Dr. Sumita Nainan


General System Architecture-Von-Neumann
Model
 Parallel Processing-The
following diagram shows
one possible way of
separating the execution
unit into eight functional
units operating in
parallel.
 The operation performed
in each functional unit is
indicated in each block if
the diagram:

Dr. Sumita Nainan


Flynn's classification

 Flynn's classification divides


computers into four major
groups that are:
 Single instruction stream,
single data stream (SISD)
 Single instruction stream,
multiple data stream (SIMD)
 Multiple instruction stream,
single data stream (MISD)
 Multiple instruction stream,
multiple data stream (MIMD)

Dr. Sumita Nainan


Computer Registers
• Registers are a type of computer
memory used to quickly accept, store,
and transfer data and instructions that
are being used immediately by the
CPU. The registers used by the CPU are
often termed as Processor registers.

• A processor register may hold an


instruction, a storage address, or any
data (such as bit sequence or
individual characters).

• The computer needs processor


registers for manipulating data and a
register for holding a memory address.
The register holding the memory
location is used to calculate the
address of the next instruction after
the execution of the current
instruction is completed.
Dr. Sumita Nainan
Computer Registers
• The Data Register (DR) contains 16 bits which hold
the operand read from the memory location.
• The Memory Address Register (MAR) contains 12
bits which hold the address for the memory
location.
• The Program Counter (PC) also contains 12 bits
which hold the address of the next instruction to
be read from memory after the current instruction
is executed.
• The Accumulator (AC) register is a general purpose
processing register.
• The instruction read from memory is placed in the
Instruction register (IR).
• The Temporary Register (TR) is used for holding the
temporary data during the processing.
• The Input Registers (IR) holds the input characters
given by the user.
• The Output Registers (OR) holds the output after
processing the input data.
• The Memory unit has a capacity of 4096 words, and
each word contains 16 bits.
Dr. Sumita Nainan
Computer Instructions
• Computer instructions are a set of machine language
instructions that a particular processor understands and
executes. A computer performs tasks on the basis of the
instruction provided.

• An instruction comprises of groups called fields. These A basic computer has three
fields include: instruction code formats which are:

1.Memory - reference instruction


2.Register - reference instruction
• The Mode field which specifies how the operand will be 3.Input-Output instruction
located.

• The Operation code (Opcode) field which specifies the


operation to be performed.

• The Address field which contains the location of the


operand, i.e., register or memory location.
Dr. Sumita Nainan
Control Unit

 The Control Unit is classified into two major categories:


1. Hardwired Control
The Hardwired Control organization involves the control logic to be implemented
with gates, flip-flops, decoders, and other digital circuits.
2. Microprogrammed Control
The Microprogrammed Control organization is implemented by using the
programming approach.

Dr. Sumita Nainan


Control Unit
Hardwired Control Microprogrammed Control

Dr. Sumita Nainan


Instruction Cycle
A program residing in the memory unit
of a computer consists of a sequence
of instructions. These instructions are
executed by the processor by going
through a cycle for each instruction.
In a basic computer, each instruction
cycle consists of the following phases:
1.Fetch instruction from memory.
2.Decode the instruction.
3.Read the effective address from
memory.
4.Execute the instruction.

Dr. Sumita Nainan


Input-Output Configuration

 In computer architecture,
input-output devices act
as an interface between
the machine and the user.
 Instructions and data
stored in the memory
must come from some
input device. The results
are displayed to the user
through some output
device.

Dr. Sumita Nainan


Number system-Syllabus
 Decimal
 Binary
 Hexadecimal notations and problems
 Conversions using 1s and 2s complement

Dr. Sumita Nainan


Number system
 Types of Number System

Dr. Sumita Nainan


Number system
 Binary Number System

 Generally, a binary number system is used in the digital computers.


 The radix (base) of the binary number system number system is 2
 This number system has only two digits, either 0 or 1.
 Conventionally – presence/absence, High/low,
 Each digit is known as a bit.
 A four-bit collection (1101) is known as a nibble,
 A collection of eight bits (11001010) is known as a byte.
 A collection of sixteen bits (11001010 11001010) is known as a word.
 ……Double word, Quad word
 The position of the first digit represents the 0th power of the base(2). Example: 20
 Examples:
 (10100)2, (11011)2, (11001)2, (000101)2, (011010)2.
 Eg. (10100)2 = 1* 24 + 0* 23 + 1* 22 + 0* 21+ 0* 20
Dr. Sumita Nainan
Number system
 Decimal Number System
 The decimal numbers are used in our day to day life.
 The decimal number system contains ten digits from 0 to 9(base 10).
 Here, the successive place value or position, left to the decimal point holds units, tens,
hundreds, thousands, and so on.
 The position in the decimal number system specifies the power of the base (10).
 The 0 is the minimum value of the digit, and 9 is the maximum value of the digit.
 For example, the decimal number 2541 consist of the digit 1 in the unit position, 4 in the
tens position, 5 in the hundreds
 position, and 2 in the thousand positions and the value will be written as:
 2×1000) + (5×100) + (4×10) + (1×1)
 (2×103) + (5×102) + (4×101) + (1×100)
 2000 + 500 + 40 + 1 2541

Dr. Sumita Nainan


Number system
 Octal Number System
 The octal number system has base 8(means it has only eight digits from 0 to 7).
 There are only eight possible digit values to represent a number.
 With the help of only three bits, an octal number is represented.
 Each set of bits has a distinct value between 0 and 7.
 E.g.
 0 – 000
 1 – 001
 2- 010
 7- 111

 (273)8, (5644)8, (0.5365)8, (1123)8, (1223)8.

Dr. Sumita Nainan


Number system
 Hexadecimal Number System
 The number system has a base of 16 means there are total 16 symbols(0, 1, 2, 3, 4,
5, 6, 7, 8, 9, A, B, C, D, E, F) used for representing a number.
 The single-bit representation of decimal values10, 11, 12, 13, 14, and 15 are
represented by A, B, C, D, E, and F.
 Only 4 bits are required for representing a number in a hexadecimal number.
 Each set of bits has a distinct value between 0 and 15.
 It has ten digits from 0 to 9 and 6 letters from A to F.
 The letters from A to F defines numbers from 10 to 15.
 It is also known as the base 16 number system.
 Example: (FAC2)16, (564)16, (0ABD5)16, (1123)16, (11F3)16

Dr. Sumita Nainan


Number system

Dr. Sumita Nainan


Conversion

 Binary to Decimal Conversion


 Example 1: (10110.001)2
 We multiplied each bit of (10110.001)2 with its respective positional weight, and last
we add the products of all the bits with its weight.
 (10110.001)2=(1×24)+(0×23)+(1×22)+(1×21)+(0×20)+
(0×2-1)+(0×2-2)+(1×2-3)
(10110.001)2=(1×16)+(0×8)+(1×4)+(1×2)+(0×1)+
(0×1⁄2)+(0×1⁄4)+(1×1⁄8)
(10110.001)2=16+0+4+2+0+0+0+0.125
(10110.001)2=(22.125 )10

Dr. Sumita Nainan


Conversion
 Binary to Octal Conversion
 There are only two steps to convert a binary number into an octal number which are as
follows:
 In the first step, we have to make the pairs of three bits on both sides of the binary point.
 If there will be one or two bits left in a pair of three bits pair, we add the required number of
zeros on extreme sides.
 In the second step, we write the octal digits corresponding to each pair.
 Example 1: (111110101011.0011)2
 1. Firstly, we make pairs of three bits on both sides of the binary point.
 111 110 101 011.001 1
 On the right side of the binary point, the last pair has only one bit. To make it a
complete pair of three bits, we added two zeros on the extreme side.
 111 110 101 011.001 100
 We then write the octal digits, which correspond to each pair.
 (111110101011.0011)2=(7653.14)8
Dr. Sumita Nainan
Conversion
 Binary to Hexadecimal Conversion
 The base numbers of binary and hexadecimal are 2 and 16, respectively.
 In a binary number, the pair of four bits is equal to one hexadecimal digit. There
are also only two steps to convert a binary number into a hexadecimal number
which are as follows:
 In the first step, we have to make the pairs of four bits on both sides of the binary
point. If there will be one, two, or three bits left in a pair of four bits pair, we add
the required number of zeros on extreme sides.
 In the second step, we write the hexadecimal digits corresponding to each pair.
 Example 1: (10110101011.0011)2
 1. Firstly, we make pairs of four bits on both sides of the binary point.
 111 1010 1011.0011
 On the left side of the binary point, the first pair has three bits. To make it a
complete pair of four bits, add one zero on the extreme side.
 0111 1010 1011.0011
 2. Then, we write the hexadecimal digits, which correspond to each pair.
 (011110101011.0011)2=(7AB.3)16

Dr. Sumita Nainan


Conversion
 Decimal to other Number System
 The decimal number can be an integer or floating-point integer.
 When the decimal number is a floating-point integer, then we convert both part (integer and
fractional) of the decimal number in the isolated form(individually).
 There are the following steps that are used to convert the decimal number into a similar
number of any base 'r'.
 In the first step, we perform the division operation on integer and successive part with
base 'r'. We will list down all the remainders till the quotient is zero. Then we find out the
remainders in reverse order for getting the integer part of the equivalent number of base 'r'.
In this, the least and most significant digits are denoted by the first and the last remainders.
 In the next step, the multiplication operation is done with base 'r' of the fractional and
successive fraction. The carries are noted until the result is zero or when the required
number of the equivalent digit is obtained. For getting the fractional part of the equivalent
number of base 'r', the normal sequence of carrying is considered.

Dr. Sumita Nainan


Conversion
 Decimal to Binary Conversion
 For converting decimal to binary, there are two steps required to perform, which are as follows:
 In the first step, we perform the division operation on the integer and the successive quotient with the base of binary(2).
 Next, we perform the multiplication on the integer and the successive quotient with the base of binary(2).
 Example 1: (152.25)10
 Step 1: Divide the number 152 and its successive quotients with base 2.

 Step 2:
 Now, perform the multiplication of 0.27 and successive
fraction with base 2.

Dr. Sumita Nainan


Conversion
 Decimal to Octal Conversion
 For converting decimal to octal, there are two steps required to perform, which are as
follows:
 In the first step, we perform the division operation on the integer and the successive
quotient with the base of octal(8).
 Next, we perform the multiplication on the integer and the successive quotient with the
base of octal(8).
 Example 1: (152.25)10
Step 2:
Step 1: Now perform the multiplication of 0.25 and successive
Divide the number 152 and its successive fraction with base 8.
quotients with base 8

Dr. Sumita Nainan


Conversion
 Decimal to hexadecimal conversion
 For converting decimal to hexadecimal, there are two steps required to perform, which are
as follows:
 In the first step, we perform the division operation on the integer and the successive
quotient with the base of hexadecimal (16).
 Next, we perform the multiplication on the integer and the successive quotient with the
base of hexadecimal (16).
 Example 1: (152.25)10
Step 2:
Step 1: Now perform the multiplication of 0.25 and
Divide the number 152 and its successive quotients successive fraction with base 16
with base 16.

Dr. Sumita Nainan

https://www.javatpoint.com/conversion-of-number-system-in-digital-electronics
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan
Dr. Sumita Nainan

You might also like