This document discusses computer organization and architecture. It begins by defining computer organization as the study of the physical components of a computer, such as the CPU, memory, and bus. Computer architecture is defined as how those components are integrated and designed to achieve functionality and performance. The document then provides an overview of the basic components of a computer system, including the input, output, central processing unit, memory, and bus structure. It also discusses concepts such as memory locations and addressing, memory operations, and instruction sets.
A computer is an electronic device that takes data and instructions as input, processes the data and produces useful information as output.
First Calculating machine: Abacus means calculating board.
Mechanical device Napier Bones for the purpose of multiplication.
Slide rule for addition, subtraction, multiplication and division.
Pascal’s adding and subtractory machine.
Leibniz’s multiplication and dividing machine.
Charles babbage’s analytical engine.
Mechanical and electrical calculator to perform all type of calculation.
Modern electronic calculator.
||||The compilation and execution process of C can be divided into multiple steps:|||
Preprocessing - Using a Preprocessor program to convert C source code in expanded source code. "#includes" and "#defines" statements will be processed and replaced actually source codes in this step.
Compilation - Using a Compiler program to convert C expanded source to assembly source code.
Assembly - Using a Assembler program to convert assembly source code to object code.
Linking - Using a Linker program to convert object code to executable code. Multiple units of object codes are linked to together in this step.
Loading - Using a Loader program to load the executable code into CPU for execution.
|||Steps to solve a Problem||||
Analyze the problem.
Divide the process used to solve the problem in a series of tasks.
Formulate the algorithm to solve the problem.
Convert the algorithm in computer program.
Write the program in computer.
Input the data.
Program operates on input data.
Result produced.
Send the generated result to output unit to display it to user.
A computer is an electronic device that takes data and instructions as input, processes the data and produces useful information as output.
First Calculating machine: Abacus means calculating board.
Mechanical device Napier Bones for the purpose of multiplication.
Slide rule for addition, subtraction, multiplication and division.
Pascal’s adding and subtractory machine.
Leibniz’s multiplication and dividing machine.
Charles babbage’s analytical engine.
Mechanical and electrical calculator to perform all type of calculation.
Modern electronic calculator.
||||The compilation and execution process of C can be divided into multiple steps:|||
Preprocessing - Using a Preprocessor program to convert C source code in expanded source code. "#includes" and "#defines" statements will be processed and replaced actually source codes in this step.
Compilation - Using a Compiler program to convert C expanded source to assembly source code.
Assembly - Using a Assembler program to convert assembly source code to object code.
Linking - Using a Linker program to convert object code to executable code. Multiple units of object codes are linked to together in this step.
Loading - Using a Loader program to load the executable code into CPU for execution.
|||Steps to solve a Problem||||
Analyze the problem.
Divide the process used to solve the problem in a series of tasks.
Formulate the algorithm to solve the problem.
Convert the algorithm in computer program.
Write the program in computer.
Input the data.
Program operates on input data.
Result produced.
Send the generated result to output unit to display it to user.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
Automobile Management System Project Report.pdfKamal Acharya
The proposed project is developed to manage the automobile in the automobile dealer company. The main module in this project is login, automobile management, customer management, sales, complaints and reports. The first module is the login. The automobile showroom owner should login to the project for usage. The username and password are verified and if it is correct, next form opens. If the username and password are not correct, it shows the error message.
When a customer search for a automobile, if the automobile is available, they will be taken to a page that shows the details of the automobile including automobile name, automobile ID, quantity, price etc. “Automobile Management System” is useful for maintaining automobiles, customers effectively and hence helps for establishing good relation between customer and automobile organization. It contains various customized modules for effectively maintaining automobiles and stock information accurately and safely.
When the automobile is sold to the customer, stock will be reduced automatically. When a new purchase is made, stock will be increased automatically. While selecting automobiles for sale, the proposed software will automatically check for total number of available stock of that particular item, if the total stock of that particular item is less than 5, software will notify the user to purchase the particular item.
Also when the user tries to sale items which are not in stock, the system will prompt the user that the stock is not enough. Customers of this system can search for a automobile; can purchase a automobile easily by selecting fast. On the other hand the stock of automobiles can be maintained perfectly by the automobile shop manager overcoming the drawbacks of existing system.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
2. COMPUTER ORGANISATION
AND ARCHITECTURE
• The components from which computers are built,
i.e., computer organization.
• In contrast, computer architecture is the science
of integrating those components to achieve a
level of functionality and performance.
• It is as if computer organization examines the
lumber, bricks, nails, and other building material
• While computer architecture looks at the design
of the house.
3. UNIT-I INTRODUCTION
•Evolution of Computer Systems
•Computer Types
•Functional units
•Basic operational concepts
•Bus structures
•Memory location and addresses
•Memory operations
•Addressing modes
•Design of a computer system
•Instruction and instruction sequencing,
•RISC versus CISC.
4. INTRODUCTION
This chapter discusses the computer
hardware, software and their
interconnection, and it also discusses
concepts like computer types, evolution of
computers, functional units, basic
operations, RISC and CISC systems.
5. Brief History of Computer
Evolution
Two phases:
1. before VLSI 1945 – 1978
• ENIAC
• IAS
• IBM
• PDP-8
2. VLSI 1978 present day
• microprocessors !
VLSI = Very Large
Scale Integration
6. Evolution of Computers
FIRST GENERATION (1945 – 1955)
• Program and data reside in the same memory
(stored program concepts – John von Neumann)
• ALP was made used to write programs
• Vacuum tubes were used to implement the
functions (ALU & CU design)
• Magnetic core and magnetic tape storage
devices are used
• Using electronic vacuum tubes, as the switching
components
7. SECOND GENERATION (1955 –
1965)
• Transistor were used to design ALU & CU
• HLL is used (FORTRAN)
• To convert HLL to MLL compiler were used
• Separate I/O processor were developed to
operate in parallel with CPU, thus improving the
performance
• Invention of the transistor which was faster,
smaller and required considerably less power to
operate
8. • IC technology improved
• Improved IC technology helped in designing low cost,
high speed processor and memory modules
• Multiprogramming, pipelining concepts were
incorporated
• DOS allowed efficient and coordinate operation of
computer system with multiple users
• Cache and virtual memory concepts were developed
• More than one circuit on a single silicon chip became
available
THIRD GENERATION (1965-1975)
9. FOURTH GENERATION (1975-
1985)
• CPU – Termed as microprocessor
• INTEL, MOTOROLA, TEXAS,NATIONAL
semiconductors started developing
microprocessor
• Workstations, microprocessor (PC) & Notebook
computers were developed
• Interconnection of different computer for better
communication LAN,MAN,WAN
• Computational speed increased by 1000 times
• Specialized processors like Digital Signal
Processor were also developed
10. • E-Commerce, E- banking, home office
• ARM, AMD, INTEL, MOTOROLA
• High speed processor - GHz speed
• Because of submicron IC technology lot of
added features in small size
BEYOND THE FOURTH GENERATION
(1985 – TILL DATE)
11. COMPUTER TYPES
Computers are classified based on the
parameters like
• Speed of operation
• Cost
• Computational power
• Type of application
12. DESK TOP COMPUTER
• Processing &storage units, visual display &audio uits,
keyboards
• Storage media-Hard disks, CD-ROMs
• Eg: Personal computers which is used in homes and
offices
• Advantage: Cost effective, easy to operate, suitable for
general purpose educational or business application
NOTEBOOK COMPUTER
• Compact form of personal computer (laptop)
• Advantage is portability
13. WORK STATIONS
• More computational power than PC
•Costlier
•Used to solve complex problems which arises in
engineering application (graphics, CAD/CAM etc)
ENTERPRISE SYSTEM (MAINFRAME)
•More computational power
•Larger storage capacity
•Used for business data processing in large organization
•Commonly referred as servers or super computers
14. SERVER SYSTEM
• Supports large volumes of data which frequently need to
be accessed or to be modified
•Supports request response operation
SUPER COMPUTERS
•Faster than mainframes
•Helps in calculating large scale numerical and algorithm
calculation in short span of time
•Used for aircraft design and testing, military application
and weather forecasting
15. HANDHELD
• Also called a PDA (Personal
Digital Assistant).
• A computer that fits into a
pocket, runs on batteries,
and is used while holding
the unit in your hand.
• Typically used as an
appointment book, address
book, calculator, and
notepad.
• Can be synchronized with a
personal microcomputer as
a backup.
16. Basic Terminology
• Computer
– A device that accepts input,
processes data, stores data,
and produces output, all
according to a series of stored
instructions.
• Hardware
– Includes the electronic and
mechanical devices that
process the data; refers to the
computer as well as peripheral
devices.
• Software
– A computer program that tells
the computer how to perform
particular tasks.
• Network
– Two or more computers and
other devices that are
connected, for the purpose of
sharing data and programs.
• Peripheral devices
– Used to expand the
computer’s input, output and
storage capabilities.
17. Basic Terminology
• Input
– Whatever is put into a computer system.
• Data
– Refers to the symbols that represent facts, objects, or ideas.
• Information
– The results of the computer storing data as bits and bytes; the words,
numbers, sounds, and graphics.
• Output
– Consists of the processing results produced by a computer.
• Processing
– Manipulation of the data in many ways.
• Memory
– Area of the computer that temporarily holds data waiting to be
processed, stored, or output.
• Storage
– Area of the computer that holds data on a permanent basis when it is
not immediately needed for processing.
18. Basic Terminology
•Assembly language program (ALP) – Programs are written
using mnemonics
•Mnemonic – Instruction will be in the form of English like
form
•Assembler – is a software which converts ALP to MLL
(Machine Level Language)
•HLL (High Level Language) – Programs are written using
English like statements
•Compiler - Convert HLL to MLL, does this job by reading
source program at once
19. Basic Terminology
•Interpreter – Converts HLL to MLL, does this job
statement by statement
•System software – Program routines which aid the
user in the execution of programs eg: Assemblers,
Compilers
•Operating system – Collection of routines
responsible for controlling and coordinating all the
activities in a computer system
20. Calvin College
Computing Systems
Computers have two kinds of components:
• Hardware, consisting of its physical
devices (CPU, memory, bus, storage
devices, ...)
• Software, consisting of the programs it
has (Operating system, applications,
utilities, ...)
21. FUNCTIONAL UNITS OF COMPUTER
• Input Unit
• Output Unit
• Central processing Unit (ALU and Control Units)
• Memory
• Bus Structure
23. Function
• ALL computer functions are:
– Data PROCESSING
– Data STORAGE
– Data MOVEMENT
– CONTROL
• NOTHING ELSE!
Data = Information
Coordinates How
Information is Used
IMPORTANT
SLIDE !
24. INPUT UNIT:
•Converts the external world data to a binary format, which
can be understood by CPU
•Eg: Keyboard, Mouse, Joystick etc
OUTPUT UNIT:
•Converts the binary format data to a format that a common
man can understand
•Eg: Monitor, Printer, LCD, LED etc
25. CPU
•The “brain” of the machine
•Responsible for carrying out computational task
•Contains ALU, CU, Registers
•ALU Performs Arithmetic and logical operations
•CU Provides control signals in accordance with some
timings which in turn controls the execution process
•Register Stores data and result and speeds up the
operation
27. •Control unit works with
a reference signal called
processor clock
•Processor divides the
operations into basic
steps
•Each basic step is
executed in one clock
cycle
T1
T2
R1 R2
R2
28. MEMORY
•Stores data, results, programs
•Two class of storage
(i) Primary (ii) Secondary
•Two types are RAM or R/W memory and ROM read only memory
•ROM is used to store data and program which is not going to
change.
•Secondary storage is used for bulk storage or mass storage
29. Basic Operational Concepts
Basic Function of Computer
• To Execute a given task as per the appropriate
program
• Program consists of list of instructions stored in
memory
31. Registers
Registers are fast stand-alone storage locations that hold data
temporarily. Multiple registers are needed to facilitate the
operation of the CPU. Some of these registers are
Two registers-MAR (Memory Address Register) and
MDR (Memory Data Register) : To handle the data
transfer between main memory and processor. MAR-
Holds addresses, MDR-Holds data
Instruction register (IR) : Hold the Instructions that is
currently being executed
Program counter: Points to the next instructions that is
to be fetched from memory
32. •(PC) (MAR)( the contents
of PC transferred to MAR)
•(MAR) (Address bus) Select a
particular memory location
•Issues RD control signals
•Reads instruction present in memory
and loaded into MDR
•Will be placed in IR (Contents
transferred from MDR to IR)
33. •Instruction present in IR will be decoded by
which processor understand what operation it
has to perform
•Increments the contents of PC by 1, so that it
points to the next instruction address
•If data required for operation is available in
register, it performs the operation
•If data is present in memory following
sequence is performed
34. •Address of the data MAR
•MAR Address bus select memory
location where is issued RD signal
•Reads data via data bus MDR
•From MDR data can be directly routed to ALU
or it can be placed in register and then
operation can be performed
•Results of the operation can be directed
towards output device, memory or register
•Normal execution preempted (interrupt)
35. Interrupt
• An interrupt is a request from I/O device
for service by processor
• Processor provides requested service by
executing interrupt service routine (ISR)
• Contents of PC, general registers, and
some control information are stored in
memory .
• When ISR completed, processor restored,
so that interrupted program may continue
36. BUS STRUCTURE
Connecting CPU and memory
The CPU and memory are normally connected by three
groups of connections, each called a bus: data bus, address
bus and control bus
Connecting CPU and memory using three buses
37. BUS STRUCTURE
•Group of wires which carries information form CPU to peripherals or
vice – versa
•Single bus structure: Common bus used to communicate between
peripherals and microprocessor
SINGLE BUS STRUCTURE
INPUT MEMORY PROCESSOR OUTPUT
38. Continued:-
• To improve performance multibus structure can be
used
•In two – bus structure : One bus can be used to fetch
instruction other can be used to fetch data, required
for execution.
•Thus improving the performance ,but cost increases
40. Cont:-
•23 = 8 i.e. 3 address line is required to select 8
location
•In general 2x = n where x number of address lines
(address bit) and n is number of location
•Address bus : unidirectional : group of wires
which carries address information bits form
processor to peripherals (16,20,24 or more parallel
signal lines)
41. Cont:-
•Databus: bidirectional : group of wires which
carries data information bit form processor to
peripherals and vice – versa
•Controlbus: bidirectional: group of wires
which carries control signals form processor to
peripherals and vice – versa
•Figure below shows address, data and control
bus and their connection with peripheral and
microprocessor
42.
43. PERFORMANCE
•Time taken by the system to execute a program
•Parameters which influence the performance are
•Clock speed
•Type and number of instructions available
•Average time required to execute an instruction
•Memory access time
•Power dissipation in the system
•Number of I/O devices and types of I/O devices
connected
•The data transfer capacity of the bus
44. MEMORY LOCATIONS AND ADDRESSES
•Main memory is the second major subsystem in a
computer. It consists of a collection of storage locations,
each with a unique identifier, called an address.
•Data is transferred to and from memory in groups of
bits called words. A word can be a group of 8 bits, 16
bits, 32 bits or 64 bits (and growing).
•If the word is 8 bits, it is referred to as a byte. The term
“byte” is so common in computer science that
sometimes a 16-bit word is referred to as a 2-byte word,
or a 32-bit word is referred to as a 4-byte word.
46. Address space
•To access a word in memory requires an identifier. Although
programmers use a name to identify a word (or a collection
of words), at the hardware level each word is identified by an
address.
•The total number of uniquely identifiable locations in
memory is called the address space.
•For example, a memory with 64 kilobytes (16 address line
required) and a word size of 1 byte has an address space that
ranges from 0 to 65,535.
48. Example 1
A computer has 32 MB (megabytes) of memory. How many bits
are needed to address any single byte in memory?
Solution
The memory address space is 32 MB, or 225 (25 × 220). This
means that we need log2 225, or 25 bits, to address each byte.
Example 2
A computer has 128 MB of memory. Each word in this computer
is eight bytes. How many bits are needed to address any single
word in memory?
Solution
The memory address space is 128 MB, which means 227.
However, each word is eight (23) bytes, which means that we
have 224 words. This means that we need log2 224, or 24 bits, to
address each word.
49. Assignment of byte addresses
• Little Endian (e.g., in DEC, Intel)
» low order byte stored at lowest address
» byte0 byte1 byte2 byte3
• Eg: 46,78,96,54 (32 bit data)
• H BYTE L BYTE
• 8000
• 8001
• 8002
• 8003
• 8004
54
96
78
46
|
50. Big Endian
• Big Endian (e.g., in IBM, Motorolla, Sun,
HP)
» high order byte stored at lowest address
» byte3 byte2 byte1 byte0
• Programmers/protocols should be careful
when transferring binary data between Big
Endian and Little Endian machines
51. • In case of 16 bit data, aligned words begin
at byte addresses of
0,2,4,………………………….
• In case of 32 bit data, aligned words begin
at byte address of
0,4,8,………………………….
• In case of 64 bit data, aligned words begin
at byte addresses of
0,8,16,………………………..
• In some cases words can start at an
arbitrary byte address also then, we say
that word locations are unaligned
52. MEMORY OPERATIONS
• Today, general-purpose computers use a set of
instructions called a program to process data.
• A computer executes the program to create output data
from input data
• Both program instructions and data operands are stored
in memory
• Two basic operations requires in memory access
• Load operation (Read or Fetch)-Contents of
specified memory location are read by processor
• Store operation (Write)- Data from the processor
is stored in specified memory location
53. • INSTRUCTION SET ARCHITECTURE:-
Complete instruction set of the processor
• BASIC 4 TYPES OF OPERATION:-
• Data transfer between memory and
processor register
• Arithmetic and logic operation
• Program sequencing and control
• I/O transfer
54. Register transfer notation (RTN)
Transfer between processor registers & memory,
between processor register & I/O devices
Memory locations, registers and I/O register names
are identified by a symbolic name in uppercase
alphabets
• LOC,PLACE,MEM are the address of memory
location
• R1 , R2,… are processor registers
• DATA_IN, DATA_OUT are I/O registers
55. •Contents of location is indicated by using square
brackets [ ]
•RHS of RTN always denotes a values, and is
called Source
•LHS of RTN always denotes a symbolic name
where value is to be stored and is called destination
•Source contents are not modified
•Destination contents are overwritten
57. ASSEMBLY LANGUAGE
NOTATION (ALN)
• RTN is easy to understand and but
cannot be used to represent machine
instructions
• Mnemonics can be converted to machine
language, which processor understands
using assembler
Eg:
1. MOVE LOCN, R2
2. ADD R3, R2, R4
58. TYPE OF INSTRUCTION
Three address instruction
•Syntax: Operation source 1, source 2, destination
•Eg: ADD D,E,F where D,E,F are memory
location
•Advantage: Single instruction can perform the
complete operation
•Disadvantage : Instruction code will be too large to
fit in one word location in memory
59. TWO ADDRESS INSTRUCTION
•Syntax : Operation source, destination
•Eg: MOVE E,F MOVE D,F
ADD D,F OR ADD E,F
Perform ADD A,B,C using 2 instructions
MOVE B,C
ADD A,C
Disadvantage: Single instruction is not sufficient to
perform the entire operation.
60. ONE ADDRESS INSTRUCTION
• Syntax- Operation source/destination
• In this type either a source or destination
operand is mentioned in the instruction
• Other operand is implied to be a
processor register called Accumulator
• Eg: ADD B (general)
• Load D; ACC [memlocation _D]
• ADD E; ACC (ACC) +(E)
• STORE F; memlocation_ F (ACC )
61. Zero address instruction
• Location of all operands are defined
implicitly
• Operands are stored in a structure called
pushdown stack
62. Continued
If processor supports ALU operations one data in
memory and other in register then the instruction
sequence is
• MOVE D, Ri
• ADD E, Ri
• MOVE Ri, F
If processor supports ALU operations only with registers
then one has to follow the instruction sequence given
below
• LOAD D, Ri
• LOAD E, Rj
• ADD Ri, Rj
• MOVE Rj, F
63. Basic Instruction Cycle
• Basic computer operation cycle
– Fetch the instruction from memory into a
control register (PC)
– Decode the instruction
– Locate the operands used by the instruction
– Fetch operands from memory (if necessary)
– Execute the operation in processor registers
– Store the results in the proper place
– Go back to step 1 to fetch the next instruction
64. INSTRUCTION EXECUTION & STRIAGHT LINE
SEQUENCING
Move A,R0
Add B,R0
Move R0,C
.
.
.
.
.
.
.
.
Contents
A
B
C
Data for Program
C [A]+[B]
}3-instruction program
segment
Address
Begin execution here i
i+4
i+8
65. • PC – Program counter: hold the address of the
next instruction to be executed
• Straight line sequencing: If fetching and
executing of instructions is carried out one by
one from successive addresses of memory, it is
called straight line sequencing.
• Major two phase of instruction execution
• Instruction fetch phase: Instruction is fetched
form memory and is placed in instruction register
IR
• Instruction execute phase: Contents of IR is
decoded and processor carries out the
operation either by reading data from memory or
registers.
67. BRANCHING
• Branch instruction are those which changes the
normal sequence of execution.
• Sequence can be changed either conditionally
or unconditionally.
• Accordingly we have conditional branch
instructions and unconditional branch
instruction.
• Conditional branch instruction changes the
sequence only when certain conditions are met.
• Unconditional branch instruction changes the
sequence of execution irrespective of condition
of the results.
68. CONDITION CODES
CONDITIONAL CODE FLAGS: The processor keeps
track of information about the results of various
operations for use by subsequent conditional branch
instructions
• N – Negative 1 if results are Negative
0 if results are Positive
• Z – Zero 1 if results are Zero
0 if results are Non zero
• V – Overflow 1 if arithmetic overflow occurs
0 non overflow occurs
• C – Carry 1 if carry and from MSB bit
0 if there is no carry from MSB bit
70. Processing the instructions
Simple computer, like most computers, uses machine cycles.
A cycle is made of three phases: fetch, decode and execute.
During the fetch phase, the instruction whose address is determined by
the PC is obtained from the memory and loaded into the IR. The PC is
then incremented to point to the next instruction.
During the decode phase, the instruction in IR is decoded and the
required operands are fetched from the register or from memory.
During the execute phase, the instruction is executed and the results are
placed in the appropriate memory location or the register.
Once the third phase is completed, the control unit starts the cycle again,
but now the PC is pointing to the next instruction.
The process continues until the CPU reaches a HALT instruction.
71. Types of Addressing Modes
The different ways in which the location of the operand is
specified in an instruction are referred to as addressing
modes
• Immediate Addressing
• Direct Addressing
• Indirect Addressing
• Register Addressing
• Register Indirect Addressing
• Relative Addressing
• Indexed Addressing
72. Immediate Addressing
• Operand is given explicitly in the instruction
• Operand = Value
• e.g. ADD 5
– Add 5 to contents of accumulator
– 5 is operand
• No memory reference to fetch data
• Fast
• Limited range
Instruction
opcode
operand
73. Direct Addressing
• Address field contains address of operand
• Effective address (EA) = address field (A)
• e.g. ADD A
– Add contents of cell A to accumulator
– Look in memory at address A for operand
• Single memory reference to access data
• No additional calculations to work out effective
address
• Limited address space
75. Indirect Addressing (1)
• Memory cell pointed to by address field
contains the address of (pointer to) the
operand
• EA = [A]
– Look in A, find address (A) and look there for
operand
• e.g. ADD (A)
– Add contents of cell pointed to by contents of
A to accumulator
76. Indirect Addressing (2)
• Large address space
• 2n where n = word length
• May be nested, multilevel, cascaded
– e.g. EA = (((A)))
• Draw the diagram yourself
• Multiple memory accesses to find operand
• Hence slower
78. Register Addressing (1)
• Operand is held in register named in
address field
• EA = R
• Limited number of registers
• Very small address field needed
– Shorter instructions
– Faster instruction fetch
79. Register Addressing (2)
• No memory access
• Very fast execution
• Very limited address space
• Multiple registers helps performance
– Requires good assembly programming or
compiler writing
81. Register Indirect Addressing
• C.f. indirect addressing
• EA = [R]
• Operand is in memory cell pointed to by
contents of register R
• Large address space (2n)
• One fewer memory access than indirect
addressing
82. Register Indirect Addressing Diagram
Register Address R
Opcode
Instruction
Memory
Operand
Pointer to Operand
Registers
83. Indexed Addressing
• EA = X + [R]
• Address field hold two values
– X = constant value (offset)
– R = register that holds address of memory
locations
– or vice versa
(Offset given as constant or in the index
register)
Add 20(R1),R2 or Add 1000(R1),R2
85. Relative Addressing
• A version of displacement addressing
• R = Program counter, PC
• EA = X + (PC)
• i.e. get operand from X bytes away from
current location pointed to by PC
• c.f locality of reference & cache usage
86. Auto increment mode
• The effective address of the operand is the
contents of a register specified in the
instruction.
• After accessing the operand, the contents of
this register are automatically incremented to
point to the next item in the list
• EA=[Ri]; Increment Ri ---- (Ri)+
Eg: Add (R2)+,R0
87. Auto decrement mode
• The contents of a register specified in the
instruction are first automatically
decremented and are then used as the
effective address of the operand
• Decrement Ri; EA= [Ri] ----- -(Ri)
88. Addressing Architecture
• Memory-to-Memory architecture
– All of the access of addressing -> Memory
– Have only control registers such PC
– Too many memory accesses
• Register-to-Register architecture
– Allow only one memory address
• “load”, “store” instructions
• Register-to-Memory architecture
– Program lengths and # of memory accesses tend to be intermediate
between the above two architectures
• Single accumulator architecture
– Have no register profile
– Too many memory accesses
• Stack architecture
– Data manipulation instructions use no address.
– Too many memory (stack) accesses
– Useful for rapid interpretation of high-level lang. programs in which
the intermediate code representation uses stack operations.
89. Addressing Modes
• Implied mode
–The operand is specified implicitly in the
definition of the opcode.
• Immediate mode
–The actual operand is specified in the
instruction itself.
91. Instruction Set Architecture
• RISC (Reduced Instruction Set Computer) Architectures
– Memory accesses are restricted to load and store instruction,
and data manipulation instructions are register to register.
– Addressing modes are limited in number.
– Instruction formats are all of the same length.
– Instructions perform elementary operations
• CISC (Complex Instruction Set Computer) Architectures
– Memory access is directly available to most types of
instruction.
– Addressing mode are substantial in number.
– Instruction formats are of different lengths.
– Instructions perform both elementary and complex
operations.
92. Instruction Set Architecture
• RISC (Reduced Instruction Set Computer)
Architectures
– Large register file
– Control unit: simple and hardwired
– pipelining
• CISC (Complex Instruction Set Computer)
Architectures
– Register file: smaller than in a RISC
– Control unit: often micro-programmed
– Current trend
• CISC operation a sequence of RISC-like operations
93. CISC Examples
• Examples of CISC processors are the
– System/360(excluding the 'scientific' Model
44),
– VAX,
– PDP-11,
– Motorola 68000 family
– Intel x86 architecture based processors.
94. Pro’s
• Emphasis on hardware
• Includes multi-clock complex
instructions
• Memory-to-memory:
"LOAD" and "STORE"
incorporated in instructions
• Small code sizes,
high cycles per second
• Transistors used for storing
complex instructions
95. Con’s
• That is, the incorporation of older instruction sets
into new generations of processors tended to
force growing complexity.
• Many specialized CISC instructions were not
used frequently enough to justify their existence.
• Because each CISC command must be
translated by the processor into tens or even
hundreds of lines of microcode, it tends to run
slower than an equivalent series of simpler
commands that do not require so much
translation.
96. RISC Examples
• Apple iPods (custom ARM7TDMI SoC)
• Apple iPhone (Samsung ARM1176JZF)
• Palm and PocketPC PDAs and smartphones
(Intel XScale family, Samsung SC32442 -
ARM9)
• Nintendo Game Boy Advance (ARM7)
• Nintendo DS (ARM7, ARM9)
• Sony Network Walkman (Sony in-house ARM
based chip)
• Some Nokia and Sony Ericsson mobile phones
97. Pro’s
• Emphasis on software
• Single-clock,
reduced instruction only
• Register to register:
"LOAD" and "STORE"
are independent instructions
• Low cycles per second,
large code sizes
• Spends more transistors
on memory registers
98. Performance
• The CISC approach attempts to
minimize the number of instructions
per program, sacrificing the number
of cycles per instruction. RISC does
the opposite, reducing the cycles per
instruction at the cost of the number
of instructions per program.
99. Characteristics of RISC Vs CISC
processors
No RISC CISC
1 Simple instructions taking one
cycle
Complex instructions taking
multiple cycles
2 Instructions are executed by
hardwired control unit
Instructions are executed by
microprogramed control unit
3 Few instructions Many instructions
4 Fixed format instructions Variable format instructions
5 Few addressing mode, and most
instructions have register to
register addressing mode
Many addressing modes
6 Multiple register set Single register set
7 Highly pipelined Not pipelined or less pipelined
100. SUMMARY
Computer components and its function
Evolution and types of computer
Instruction and instruction sequencing
Addressing modes
RISC Vs CISC
101. REFERENCES
• Carl Hammacher,”Computer
Organization,”Fifth Edition,McGrawHill
International Edition,2002
• P.Pal Chaudhuri,”Compter Organization
and Design”,2nd Edition ,PHI,2003
• William Stallings,”Computer organization
and Architecture-Designing for
Performance”,PHI,2004