SlideShare a Scribd company logo
Chapter three
Basic Computer Organization and Design
Computer organization refers to the way the various components of a computer system are
interconnected and work together to perform tasks and execute programs.
It encompasses the design and arrangement of hardware components, including the central
processing unit (CPU), memory, input/output devices, and control units, to ensure
efficient and effective operation of the computer.
➢ The internal organization of a digital system is defined by the sequence of micro-operations
it performs on data stored in its registers.
➢ The general-purpose digital computer is capable of executing various micro-operations
and, in addition, can be instructed as to what specific sequence of operations it must
perform.
Computer organization includes the physical connection component, like circuits with adder
subtractor. If we talk about CPU organization, its three types are:
➢ Single Accumulator Organization
➢ General Register Organization
➢ Stack Organization
Computer organization plays a crucial role in determining the overall performance and efficiency
of a computer system.
Designing efficient interactions between hardware components is essential for achieving optimal
processing speeds and responsiveness.
➢ The user of the computer can control the process by means of a program. A Program is a
set of instructions that specify the operations, operands, and the sequence by which
processing has to occur.
➢ Computer Register
▪ Computer instructions are usually stored in consecutive memory locations and executed
sequentially one at a time. this requires a register which can stored the address of the next
instruction; we call it the Program Counter.
▪ We need registers which can hold the address at which a memory operand is stored as well
as the value itself.
▪ We need a place where we can store:
▪ temporary data
▪ the instruction being executed
▪ a character being read in, a character being written out.
Addressing modes
The way in which the operand is specified is called its addressing mode.
• It indicates the way of locating data or it indicates the way of locating data or operands
Two categories Two categories
▪ Those for data / sequential execution programming
▪ Those for branch addresses
Data related addressing modes
1. Immediate Immediate – the datum is either 8 bits or the datum is either 8 bits or 16 bits
long and is part of the instruction
2. Direct – the 16-bit effective address of the 16-bit effective address of the datum is part of
the instruction
3. Register Register – the datum is in the register that the datum is in the register that is
specified by the instruction
4. Register indirect – the effective address of the effective address of the datum is in the base
register BX or in an index register that is specified by the instruction
5. Indexed – offset of the operand is stored in one of offset of the operand is stored in one of
the index registers.
6. Register relative – the EA is the sum of an 8 bit or the EA is the sum of an 8 bit or 16-bit
displacement and the contents of a base register or an index register.
7.Based indexed – the effective address is the effective address is the sum of a base register
and an index register both of which are specified by the instruction
8. Relative Based indexed – The EA is the EA is the sum of an 8 bit or 16-bit displacement
and a based indexed address.
I. Basic organization of the von Neumann machine
➢ It is a type of digital computer architecture in which the design follows the concept of the
computers with stored programs where they store the program data along with the
instruction data in the very same memory.
➢ There are four main components within the Von Neumann Architecture. These components
work together to enable processing, storage, and communication within the computer
system. They are:
➢ Central Processing Unit (CPU): The part of a computer that carries out instructions and
performs arithmetic, logical, and control operations.
➢ Memory: A place where the computer stores and retrieves data and instructions.
➢ Input-Output (I/O) devices: Components responsible for interfacing the computer with
the external world. Examples of I/O devices include keyboards, printers, and monitors.
➢ System Bus: A communication pathway that connects the CPU, memory, and I/O devices,
enabling data and control signals to flow between these components.
II. What is Harvard Architecture
➢ It is a type of digital computer architecture in which the design follows a basic concept of
having separate signal paths (buses) and separate storage for data and instructions.
➢ This type of architecture basically surfaced to overcome the overall bottleneck of the Von
Neumann Architecture.
➢ This microcontroller design has separate storage areas and signals for instructions and data.
The basic difference between Von Neumann and Harvard Architecture is the contrast in the
storage area for instructions and data.
➢ Unlike Harvard, Von Neumann has the same storage unit for programs and instructions.
However, modern processors use Von Neumann microcontrollers
Instruction Codes:
➢ A set of instructions that specify the operations, operands, and the sequence by
which processing has to occur.
➢ An instruction code is a group of bits that tells the computer to perform a specific
operation part. Format of Instruction
➢ The format of an instruction is depicted in a rectangular box symbolizing the bits
of an instruction. Basic fields of an instruction format are given below:
1. An operation code field that specifies the operation to be performed.
2. An address field that designates the memory address or register.
3. A mode field that specifies the way the operand of effective address is
determined.
Computers may have instructions of different lengths containing varying number
of addresses. The number of address field in the instruction format depends upon
the internal organization of its registers
Computer Instructions:
The basic computer has 16-bit instruction register (IR) which can denote either memory reference
or register reference or input-output instruction.
I. Memory Reference – These instructions refer to memory address as an operand. The other
operand is always accumulator.
Specifies 12-bit address, 3-bit opcode (other than 111) and 1 bit addressing mode for direct
and indirect addressing.
Example – IR register contains = 0001XXXXXXXXXXXX, i.e., ADD after fetching and
decoding of instruction we find out that it is a memory reference instruction for ADD
operation.
Hence, DR <- M[AR] AC <- AC+ DR, SC <- 0
II. Register Reference – These instructions perform operations on registers rather than
memory addresses.
The IR (14-12) is 111 (differentiates it from memory reference) and IR (15) is 0 (differentiates
it from input/output instructions).
The rest 12 bits specify register operation. Example – IR register contains =
0111001000000000, i.e., CMA after fetch and decode cycle we find out that it is a register
reference instruction for complement accumulator. Hence, AC <- ~AC
III. Input/Output – These instructions are for communication between computer and outside
environment.
The IR (14-12) is 111 (differentiates it from memory reference) and IR (15) is 1 (differentiates
it from register reference instructions). The rest 12 bits specify I/O operation. Example – IR
register contains = 1111100000000000, i.e., INP after fetch and decode cycle we find out that
it is an input/output instruction for inputting character. Hence, INPUT character from
peripheral device
Direct and Indirect Addressing Modes
➢ When the second part specifies the address of an operand, the instruction is said to have
direct address.
➢ This is in contrast to a third possibility called indirect address, where the bits in the
second part of the instruction designate an address of memory word in which the address
of the operand is found.
The register-reference instructions
are recognized by the operation code 111 with a 0 in the left most bit (bit 15) of the instruction
Input-output instructions
Timing and Control
All sequential circuits in the Basic Computer CPU are driven by a master clock, with the
exception of the INPR register.
At each clock pulse, the control unit sends control signals to control inputs of the bus, the
registers, and the ALU.
Control unit design and implementation can be done by two general methods:
➢ A hardwired control unit is designed from scratch using traditional digital logic
design techniques to produce a minimal, optimized circuit. In other words, the control
unit is like an ASIC (application-specific integrated circuit).
➢ A microprogrammed control unit is built from some sort of ROM. The desired
control signals are simply stored in the ROM, and retrieved in sequence to drive the
microoperations needed by a particular instruction.
The following section deals with the control unit. As we can see in figure 5.1, the control unit
consists of two decoders, a sequence counter, and logic gates.
As depicted in figure 5.1, any instruction which is read from the memory is placed in the
Instruction Register (IR). Here, the IR is split into three parts, namely, I bit, opcode, and bits
from 0 through 11.
The opcodes are decoded with a 3 * 8 decoder whose outputs are denoted by symbols D0
through D7 .
The binary value of the respective opcode is the subscripted number in the symbol. The
symbol I which is the 15th bit of the instruction is moved to a flip flop.
The control logic gates have the bits that are applied from 0 through 11. The sequence counter
is 4-bit counts in binary from 0 through 15.
It can be incremented or cleared synchronously. The timing signals from T0 through T15 are
the decoded outputs of decoder.
A memory that is read or written is always initiated with the rising timing signal. We are aware
Notes that a clock cycle time is greater than a memory cycle time.
So, when the clock goes through its next positive transition, the memory read/written gets
completed.
This transition is used to load the memory word to register. But in usual cases, the memory
cycle time is longer than the processor cycle. So, it contradicts the timing relation. Therefore,
wait cycles are provided till the memory word is made available.
Consider figure 5.2 that shows the time relation between the control signals.
In figure 5.2, the control signals are generated by the 4-bit sequence counter and a 4 * 16
decoder.
In this figure, consider at time T4 , Sequence Counter (SC) is cleared to 0 if the output D3 of
decoder is active.
This can be represented as: D3T4: SC  0 The SC gives response to the positive transition of
the clock. The CLR input of the SC is active in the beginning.
➢ Instruction Cycle
The main execution process is done by the processor. The processing of instruction involves two
steps, instruction fetch and instruction execution. Each instruction is fetched from the memory
separately and executed. Depending on the nature of the instruction its execution may deal with a
number of operations. An instruction cycle refers to the processing of a particular instruction.
Each instruction cycle goes through the following phases during its processing:
1. Fetching instruction from memory.
2. Decoding the instruction.
3. Reading the effective address from memory in case of indirect address.
4. Executing the instruction
After the above four steps are completed, the control switches back to the first step and repeats
the same process for the next instruction. Hence, the cycle continues until a HALT condition
is met. Figure 5.3 depicts the phases involved in the instruction cycle.
As shown in figure 5.3 the halt condition occurs when the machine gets turned off, on
occurrence of errors that are unrecoverable, and so on.
Computer Languages
Over the years, computer languages have been evolved from Low-Level to High-Level Languages.
In the earliest days of computers, only Binary Language was used to write programs. The computer
languages are classified as follows:
Assembly is an intermediate language between high-level programming and machine
language.
➢ machine Language (low level language)
Low-Level language is the only language which can be understood by the computer. Low-
level language is also known as Machine Language.
The machine language contains only two symbols 1 & 0. All the instructions of machine
language are written in the form of binary numbers 1's & 0's. A computer can directly
understand the machine language.
➢ Assembly Language (middle level language)
Middle-level language is a computer language in which the instructions are created using symbols
such as letters, digits and special characters.
Assembly language is an example of middle-level language. In assembly language, we use
predefined words called mnemonics.
Binary code instructions in low-level language are replaced with mnemonics and operands in
middle-level language.
But the computer cannot understand mnemonics, so we use a translator called Assembler to
translate mnemonics into machine language.
Assembler is a translator which takes assembly code as input and produces machine code as output.
That means, the computer cannot understand middle-level language, so it needs to be translated
into a low-level language to make it understandable by the computer. Assembler is used to translate
middle-level language into low-level language.
g++ -S main.cpp -o main’s
Assembly language is more than low-level and less than high-level language. Hence, it is also
referred to as intermediary language. It uses symbols and abbreviations instead of binary numbers
0s and 1s. For example, assembly language uses symbols often known as mnemonics like Add for
addition, Sub for subtraction, Mul for multiplication, and so forth.
Assembly language codes are more human-readable than machine languages ones. Unlike machine
code, it is not very difficult for users to remember or understand assembly codes and commands.
Since the assembly language code uses mnemonics which isn’t understandable by the CPU
directly, it needs a translator to convert mnemonic codes (assembly language code) into machine
language (machine or object or binary code). It is done with the help of a compiler known
as assembler. Now let's see what this assembler is, and it's working in detail.
➢ High Level Language
High-level language is a computer language which can be understood by the users. The high-level
language is very similar to human languages and has a set of grammar rules that are used to make
instructions more easily.
Every high-level language has a set of predefined words known as Keywords and a set of rules
known as Syntax to create instructions.
The high-level language is easier to understand for the users but the computer cannot understand
it. High-level language needs to be converted into the low-level language to make it understandable
by the computer.
We use Compiler or interpreter to convert high-level language to low-level language.
Languages like FORTRAN, C, C++, JAVA, Python, etc., are examples of high-level languages.
All these programming languages use human-understandable language like English to write
program instructions. These instructions are converted to low-level language by the compiler or
interpreter so that it can be understood by the computer.
g++ main.cpp

More Related Content

Similar to Chapter 3 computer organization and artpdf

cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
VishnuVinay6
 
instruction codes
instruction codesinstruction codes
instruction codes
SangeethaSasi1
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
Anonymous Red
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
Anuja Gunale
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
Bharti189559
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Unit I.pptx
Unit I.pptxUnit I.pptx
Unit I.pptx
sahushweta1702
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
SaralaT3
 
microprocessor
 microprocessor microprocessor
microprocessor
ATTO RATHORE
 
Computer organisation and architecture module 1
Computer organisation and architecture module 1Computer organisation and architecture module 1
Computer organisation and architecture module 1
abinrj123
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2
parthivrathodlits
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
AshokRachapalli1
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessor
ankitnav1
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessor
ankitnav1
 
microprocessor architecture
microprocessor architecture microprocessor architecture
microprocessor architecture
Nadeem Hilal Wani
 
unit-i.pdf
unit-i.pdfunit-i.pdf
unit-i.pdf
RISHI643981
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
mahesh kumar prajapat
 
Ca basic computer organization
Ca basic computer organizationCa basic computer organization
Ca basic computer organization
Prof. Dr. K. Adisesha
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
Mrunal Deshkar
 
Introduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptxIntroduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptx
VishalGaur54
 

Similar to Chapter 3 computer organization and artpdf (20)

cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
 
instruction codes
instruction codesinstruction codes
instruction codes
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNBASIC COMPUTER ORGANIZATION AND DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Unit I.pptx
Unit I.pptxUnit I.pptx
Unit I.pptx
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
 
microprocessor
 microprocessor microprocessor
microprocessor
 
Computer organisation and architecture module 1
Computer organisation and architecture module 1Computer organisation and architecture module 1
Computer organisation and architecture module 1
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessor
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessor
 
microprocessor architecture
microprocessor architecture microprocessor architecture
microprocessor architecture
 
unit-i.pdf
unit-i.pdfunit-i.pdf
unit-i.pdf
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
Ca basic computer organization
Ca basic computer organizationCa basic computer organization
Ca basic computer organization
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
 
Introduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptxIntroduction to 8085 Microprocessor.pptx
Introduction to 8085 Microprocessor.pptx
 

Recently uploaded

H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 

Recently uploaded (20)

H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 

Chapter 3 computer organization and artpdf

  • 1. Chapter three Basic Computer Organization and Design Computer organization refers to the way the various components of a computer system are interconnected and work together to perform tasks and execute programs. It encompasses the design and arrangement of hardware components, including the central processing unit (CPU), memory, input/output devices, and control units, to ensure efficient and effective operation of the computer. ➢ The internal organization of a digital system is defined by the sequence of micro-operations it performs on data stored in its registers. ➢ The general-purpose digital computer is capable of executing various micro-operations and, in addition, can be instructed as to what specific sequence of operations it must perform. Computer organization includes the physical connection component, like circuits with adder subtractor. If we talk about CPU organization, its three types are: ➢ Single Accumulator Organization ➢ General Register Organization ➢ Stack Organization Computer organization plays a crucial role in determining the overall performance and efficiency of a computer system. Designing efficient interactions between hardware components is essential for achieving optimal processing speeds and responsiveness.
  • 2.
  • 3. ➢ The user of the computer can control the process by means of a program. A Program is a set of instructions that specify the operations, operands, and the sequence by which processing has to occur. ➢ Computer Register ▪ Computer instructions are usually stored in consecutive memory locations and executed sequentially one at a time. this requires a register which can stored the address of the next instruction; we call it the Program Counter. ▪ We need registers which can hold the address at which a memory operand is stored as well as the value itself. ▪ We need a place where we can store: ▪ temporary data ▪ the instruction being executed ▪ a character being read in, a character being written out. Addressing modes The way in which the operand is specified is called its addressing mode. • It indicates the way of locating data or it indicates the way of locating data or operands
  • 4. Two categories Two categories ▪ Those for data / sequential execution programming ▪ Those for branch addresses Data related addressing modes 1. Immediate Immediate – the datum is either 8 bits or the datum is either 8 bits or 16 bits long and is part of the instruction 2. Direct – the 16-bit effective address of the 16-bit effective address of the datum is part of the instruction 3. Register Register – the datum is in the register that the datum is in the register that is specified by the instruction 4. Register indirect – the effective address of the effective address of the datum is in the base register BX or in an index register that is specified by the instruction 5. Indexed – offset of the operand is stored in one of offset of the operand is stored in one of the index registers. 6. Register relative – the EA is the sum of an 8 bit or the EA is the sum of an 8 bit or 16-bit displacement and the contents of a base register or an index register. 7.Based indexed – the effective address is the effective address is the sum of a base register and an index register both of which are specified by the instruction 8. Relative Based indexed – The EA is the EA is the sum of an 8 bit or 16-bit displacement and a based indexed address. I. Basic organization of the von Neumann machine ➢ It is a type of digital computer architecture in which the design follows the concept of the computers with stored programs where they store the program data along with the instruction data in the very same memory.
  • 5. ➢ There are four main components within the Von Neumann Architecture. These components work together to enable processing, storage, and communication within the computer system. They are: ➢ Central Processing Unit (CPU): The part of a computer that carries out instructions and performs arithmetic, logical, and control operations. ➢ Memory: A place where the computer stores and retrieves data and instructions. ➢ Input-Output (I/O) devices: Components responsible for interfacing the computer with the external world. Examples of I/O devices include keyboards, printers, and monitors. ➢ System Bus: A communication pathway that connects the CPU, memory, and I/O devices, enabling data and control signals to flow between these components.
  • 6. II. What is Harvard Architecture ➢ It is a type of digital computer architecture in which the design follows a basic concept of having separate signal paths (buses) and separate storage for data and instructions. ➢ This type of architecture basically surfaced to overcome the overall bottleneck of the Von Neumann Architecture. ➢ This microcontroller design has separate storage areas and signals for instructions and data. The basic difference between Von Neumann and Harvard Architecture is the contrast in the storage area for instructions and data. ➢ Unlike Harvard, Von Neumann has the same storage unit for programs and instructions. However, modern processors use Von Neumann microcontrollers
  • 7. Instruction Codes: ➢ A set of instructions that specify the operations, operands, and the sequence by which processing has to occur. ➢ An instruction code is a group of bits that tells the computer to perform a specific operation part. Format of Instruction ➢ The format of an instruction is depicted in a rectangular box symbolizing the bits of an instruction. Basic fields of an instruction format are given below: 1. An operation code field that specifies the operation to be performed. 2. An address field that designates the memory address or register. 3. A mode field that specifies the way the operand of effective address is determined. Computers may have instructions of different lengths containing varying number of addresses. The number of address field in the instruction format depends upon the internal organization of its registers Computer Instructions: The basic computer has 16-bit instruction register (IR) which can denote either memory reference or register reference or input-output instruction.
  • 8. I. Memory Reference – These instructions refer to memory address as an operand. The other operand is always accumulator. Specifies 12-bit address, 3-bit opcode (other than 111) and 1 bit addressing mode for direct and indirect addressing. Example – IR register contains = 0001XXXXXXXXXXXX, i.e., ADD after fetching and decoding of instruction we find out that it is a memory reference instruction for ADD operation. Hence, DR <- M[AR] AC <- AC+ DR, SC <- 0 II. Register Reference – These instructions perform operations on registers rather than memory addresses. The IR (14-12) is 111 (differentiates it from memory reference) and IR (15) is 0 (differentiates it from input/output instructions). The rest 12 bits specify register operation. Example – IR register contains = 0111001000000000, i.e., CMA after fetch and decode cycle we find out that it is a register reference instruction for complement accumulator. Hence, AC <- ~AC III. Input/Output – These instructions are for communication between computer and outside environment. The IR (14-12) is 111 (differentiates it from memory reference) and IR (15) is 1 (differentiates it from register reference instructions). The rest 12 bits specify I/O operation. Example – IR register contains = 1111100000000000, i.e., INP after fetch and decode cycle we find out that it is an input/output instruction for inputting character. Hence, INPUT character from peripheral device Direct and Indirect Addressing Modes ➢ When the second part specifies the address of an operand, the instruction is said to have direct address. ➢ This is in contrast to a third possibility called indirect address, where the bits in the second part of the instruction designate an address of memory word in which the address of the operand is found.
  • 9.
  • 10. The register-reference instructions are recognized by the operation code 111 with a 0 in the left most bit (bit 15) of the instruction
  • 11.
  • 13. Timing and Control All sequential circuits in the Basic Computer CPU are driven by a master clock, with the exception of the INPR register. At each clock pulse, the control unit sends control signals to control inputs of the bus, the registers, and the ALU. Control unit design and implementation can be done by two general methods: ➢ A hardwired control unit is designed from scratch using traditional digital logic design techniques to produce a minimal, optimized circuit. In other words, the control unit is like an ASIC (application-specific integrated circuit). ➢ A microprogrammed control unit is built from some sort of ROM. The desired control signals are simply stored in the ROM, and retrieved in sequence to drive the microoperations needed by a particular instruction. The following section deals with the control unit. As we can see in figure 5.1, the control unit consists of two decoders, a sequence counter, and logic gates.
  • 14. As depicted in figure 5.1, any instruction which is read from the memory is placed in the Instruction Register (IR). Here, the IR is split into three parts, namely, I bit, opcode, and bits from 0 through 11. The opcodes are decoded with a 3 * 8 decoder whose outputs are denoted by symbols D0 through D7 . The binary value of the respective opcode is the subscripted number in the symbol. The symbol I which is the 15th bit of the instruction is moved to a flip flop. The control logic gates have the bits that are applied from 0 through 11. The sequence counter is 4-bit counts in binary from 0 through 15. It can be incremented or cleared synchronously. The timing signals from T0 through T15 are the decoded outputs of decoder.
  • 15. A memory that is read or written is always initiated with the rising timing signal. We are aware Notes that a clock cycle time is greater than a memory cycle time. So, when the clock goes through its next positive transition, the memory read/written gets completed. This transition is used to load the memory word to register. But in usual cases, the memory cycle time is longer than the processor cycle. So, it contradicts the timing relation. Therefore, wait cycles are provided till the memory word is made available. Consider figure 5.2 that shows the time relation between the control signals. In figure 5.2, the control signals are generated by the 4-bit sequence counter and a 4 * 16 decoder. In this figure, consider at time T4 , Sequence Counter (SC) is cleared to 0 if the output D3 of decoder is active. This can be represented as: D3T4: SC  0 The SC gives response to the positive transition of the clock. The CLR input of the SC is active in the beginning.
  • 16. ➢ Instruction Cycle The main execution process is done by the processor. The processing of instruction involves two steps, instruction fetch and instruction execution. Each instruction is fetched from the memory separately and executed. Depending on the nature of the instruction its execution may deal with a number of operations. An instruction cycle refers to the processing of a particular instruction. Each instruction cycle goes through the following phases during its processing: 1. Fetching instruction from memory. 2. Decoding the instruction. 3. Reading the effective address from memory in case of indirect address. 4. Executing the instruction After the above four steps are completed, the control switches back to the first step and repeats the same process for the next instruction. Hence, the cycle continues until a HALT condition is met. Figure 5.3 depicts the phases involved in the instruction cycle. As shown in figure 5.3 the halt condition occurs when the machine gets turned off, on occurrence of errors that are unrecoverable, and so on. Computer Languages Over the years, computer languages have been evolved from Low-Level to High-Level Languages. In the earliest days of computers, only Binary Language was used to write programs. The computer languages are classified as follows:
  • 17. Assembly is an intermediate language between high-level programming and machine language. ➢ machine Language (low level language) Low-Level language is the only language which can be understood by the computer. Low- level language is also known as Machine Language. The machine language contains only two symbols 1 & 0. All the instructions of machine language are written in the form of binary numbers 1's & 0's. A computer can directly understand the machine language. ➢ Assembly Language (middle level language) Middle-level language is a computer language in which the instructions are created using symbols such as letters, digits and special characters. Assembly language is an example of middle-level language. In assembly language, we use predefined words called mnemonics. Binary code instructions in low-level language are replaced with mnemonics and operands in middle-level language. But the computer cannot understand mnemonics, so we use a translator called Assembler to translate mnemonics into machine language.
  • 18. Assembler is a translator which takes assembly code as input and produces machine code as output. That means, the computer cannot understand middle-level language, so it needs to be translated into a low-level language to make it understandable by the computer. Assembler is used to translate middle-level language into low-level language. g++ -S main.cpp -o main’s Assembly language is more than low-level and less than high-level language. Hence, it is also referred to as intermediary language. It uses symbols and abbreviations instead of binary numbers 0s and 1s. For example, assembly language uses symbols often known as mnemonics like Add for addition, Sub for subtraction, Mul for multiplication, and so forth. Assembly language codes are more human-readable than machine languages ones. Unlike machine code, it is not very difficult for users to remember or understand assembly codes and commands. Since the assembly language code uses mnemonics which isn’t understandable by the CPU directly, it needs a translator to convert mnemonic codes (assembly language code) into machine language (machine or object or binary code). It is done with the help of a compiler known as assembler. Now let's see what this assembler is, and it's working in detail. ➢ High Level Language High-level language is a computer language which can be understood by the users. The high-level language is very similar to human languages and has a set of grammar rules that are used to make instructions more easily. Every high-level language has a set of predefined words known as Keywords and a set of rules known as Syntax to create instructions. The high-level language is easier to understand for the users but the computer cannot understand it. High-level language needs to be converted into the low-level language to make it understandable by the computer. We use Compiler or interpreter to convert high-level language to low-level language.
  • 19. Languages like FORTRAN, C, C++, JAVA, Python, etc., are examples of high-level languages. All these programming languages use human-understandable language like English to write program instructions. These instructions are converted to low-level language by the compiler or interpreter so that it can be understood by the computer. g++ main.cpp