The document discusses addition, subtraction, multiplication, and division algorithms for signed binary numbers. It describes the process for each operation step-by-step including comparing sign bits, performing the operation, and determining the final result. Hardware implementations for addition/subtraction and multiplication are also covered, showing how the algorithms can be physically realized using components like registers, adders, and shift registers.
Computer Architecture refers to those attributes of a system that have a dire...mayurjagdale4
Computer Architecture refers to those attributes of a system that have a direct impact on
the logical execution of a program. Examples:
o the instruction set
o the number of bits used to represent various data types
o I/O mechanisms
o memory addressing techniques
index of all of the financial accounts in a company's general ledger. In shor...mayurjagdale4
index of all of the financial accounts in a company's general ledger. In short, it is an organizational tool that lists by category and line item all of the financial transactions that a company conducted during a specific accounting period
Computer Architecture refers to those attributes of a system that have a dire...mayurjagdale4
Computer Architecture refers to those attributes of a system that have a direct impact on
the logical execution of a program. Examples:
o the instruction set
o the number of bits used to represent various data types
o I/O mechanisms
o memory addressing techniques
index of all of the financial accounts in a company's general ledger. In shor...mayurjagdale4
index of all of the financial accounts in a company's general ledger. In short, it is an organizational tool that lists by category and line item all of the financial transactions that a company conducted during a specific accounting period
Information representation, Floating point representation (IEEE 754), computer arithmetic and their implementation; Fixed-point Arithmetic: Addition, Subtraction, Multiplication and Division, Memory Technology, static and dynamic memory, Random Access and Serial Access Memories, Cache memory and Memory Hierarchy, Address Mapping, Cache updation schemes, Virtual memory and memory management unit.
Information representation, Floating point representation (IEEE 754), computer arithmetic and their implementation; Fixed-point Arithmetic: Addition, Subtraction, Multiplication and Division, Memory Technology, static and dynamic memory, Random Access and Serial Access Memories, Cache memory and Memory Hierarchy, Address Mapping, Cache updation schemes, Virtual memory and memory management unit.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
In the ever-evolving landscape of technology, enterprise software development is undergoing a significant transformation. Traditional coding methods are being challenged by innovative no-code solutions, which promise to streamline and democratize the software development process.
This shift is particularly impactful for enterprises, which require robust, scalable, and efficient software to manage their operations. In this article, we will explore the various facets of enterprise software development with no-code solutions, examining their benefits, challenges, and the future potential they hold.
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
2. Addition and Subtraction with signed
magnitude data
• When signed numbers are added or
subtracted, we find that there are eight
different conditions to consider, depending
on the sign of the numbers and the operation
performed.
• These conditions are listed in the first column
of table 10-1.
• The other columns in the table show the
actual operation to be performed with the
magnitude of the number
3. If sign is different
for add=subtract
If sign is different
for subtract=add
4. Remember
• The two magnitude are subtracted if the
signs are different for an add operation or
identical for a subtract operation.
5. • The last column is needed to prevent a negative
zero.
• In other words, when two equal numbers are
subtracted, the result should be +0 not -0.
• Addition(subtraction) algorithm : when the signs
of A and B are identical ,and the two magnitudes
and attach the sign of A to the result.
• When the sign of A and B are different ,compare
the magnitudes and subtract number from the
larger.
• Choose the sign of the result to be the same as A
if A>B or the complement of the sign of A if A<B.
• If the two magnitude are equal, subtract B from
A and make the sign of the result positive.
6. Hardware Implementation
• To implement the two arithmetic operations
with hardware, it is first necessary that the
two numbers be stored in register.
• Let A and B be two registers that hold the
magnitude of the numbers, and As and Bs be
two flip-flops that hold the corresponding signs.
• The result of the operation may be transferred into A
and As.
• Thus A and As together form an accumulator register.
7.
8. Fig 10-1 shows a block diagram of the hardware for
implementing the addition and subtraction
operation.
It consists of register A and B and sign flip-flop As
and Bs
Subtraction is done by adding A to the 2’s
complement of B
The output carry is transferred to flip-flop Where it
can be checked to determine the relative
magnitude of the two numbers.
The add-overflow flip-flop AVF holds the overflow
bit when A and B are added.
The A register provides other micro operations that
may be needed when we specify the sequence of
steps in the algorithm.
9. • The addition of A plus B is done through the
parallel adder.
• The S(sum) output of the adder is applied to
the input of the A register.
• The complementer provides an output of B or
the complement of B depending on the state
of the mode control M.
• When M=0,the output of B is transferred to
the adder, the input carry is 0,and the output
of the adder is equal to the sum of A+B.
• When M=1,the 1’s complement of B is applied
to the adder, the input carry is 1,and the
output S=A+B’+1
10. • This is equal to A plus 2’s complement of
Which is equivalent to the subtraction A-B.
11. Flow chart
• The flow chart for the hardware algorithm is
presented in fig 10-2.
• The two sings As and Bs are compared by an
exclusive-OR gate.
• If the output of the gate is 0,the signs are
identical ;if it is 1,the signs are different.
• For an add operation identical signs dictate that
the magnitude be added.
• For a subtract operation, different sign dictate
that the magnitude be added
14. 1. Example for Addition A+B
A=12
B=-10 we can write as (+A)+(-B)
A>B +(12-10)
A+B= (12)+(-10)=2
2 in binary =0010
Sign bit of 12= 1
Sing bit of 10=-1
So subtraction is performed
15. A+(B’+1)=1100+2’s complement of B
B=1010 ,2’s complement of B=0110
EA=A+(B’+1)= 1100+0110=10010
E=1 and A=0010
E=1 so A>=B and As=0
Final answer is in A=2
Sign of 2 is positive because As=0
16. 2. Example for Addition A+B
A=12
B=10 we can write as (+A)+(+B)
A>B +(12+10)
A+B= (+12)+(+10)=22
22 in binary =10110
Sign bit of 12= 1
Sing bit of 10=1
1 XOR 1=0
So addition is performed
18. • The magnitude are added with a micro operation E A<-
A+B, where E A is a register that combines E and A.
• The carry in E after the addition constitute an
overflow if it is equal to 1.
• The value of E is transferred into the add-overflow
flip-flop AVE.
• The two magnitude are subtracted if the signs are
different for an add operation or identical for a
subtract operation.
• The magnitude are subtracted by adding A to the 2’s
complement of B
• No overflow can occur if the numbers are subtracted
so AVF is cleared to 0.
• A 1 in E indicates that A>=B and the number in A is the
correct result.
• If this number is zero, the sign As must be made
positive to avoid a negative zero.
19. • A 0 in E indicates that A<B. for this case it is
necessary to take 2’s complement of the value in
A.
• This operation can be done with one micro
operation A<-A’+1.
• However we assume that A register has circuit for
micro operations complement and increment, so
the 2’s complement is obtained from these two
micro operations.
• In other paths of the flowchart, the sign of the
result is the same as the sign of A, so no change
in As is required.
• However, when A<B the sign of the result is the
complement of the original sign of A.
20. it is necessary to complement As to obtain the
correct sign.
The final result is found in register A and its sign
in As.
The value in AVF provides an overflow
indication.
The final value of E is immaterial.
21. Multiplication Algorithms
• Multiplication of two fixed-point binary
numbers in signed-magnitude representation
is done with paper and pencil by a process of
successive shift and add operations.
• This process is best illustrative with a
numerical example.
23. • The process consists of looking at successive bits
of the multiplier, least significant bit first.
• If the multiplier bit is 1,the multiplicand is
copied down; otherwise ,zeros are copied down.
• The number copied down in successive lines are
shifted one position to the left from the previous
number.
• Finally, the numbers are added and their sum
forms the product.
• The sign of the product is determined from the
signs of the multiplicand and multiplier.
• If they are alike, the sign of the product is
positive.
• If they are unlike, the sign of the product is
negative
29. Hardware for multiply operation
• Initially, the multiplicand is in register B and the multiplier
in Q.
• The sum of A and B forms a partial product which is
transferred to the EA register
• Both partial product and multiplier are shifted to the right.
• This shift will be denoted by the statement shr EAQ to
designate the right shift.
• The least significant bit of A is shifted into the most
significant position Q, the bit from E is shifted into the most
significant position of A, and 0 is shifted into E.
• After the shift one bit of the partial product is shifted into
Q, pushing the multiplier bits one position to the right.
• In this manner, the rightmost flip flop in register Q,
designated by Qn, will hold the bit of the multiplier, which
must be inspected next.
30.
31. Booth Multiplication Algorithm
• Booth algorithm gives a procedure
for multiplying binary integers in signed 2’s
complement representation in efficient way,
i.e., less number of additions/subtractions
required.
32.
33. • AC and the appended bit Qn+1 are initially
cleared to 0 and the sequence counter SC is
set to a number n equal to the number of bits
in the multiplier.
• The two bits of the multiplier in Qn and Qn+1
are inspected.
• If the two bits are equal to 10,it means that
the first 1 in a string of 1’s has been
encountered.
• This requires a subtraction of the multiplicand
from the partial product in AC.
• If the two bits are equal to 01,it means that
the first 0 in a string of 0’s has been
encountered.
34. • This requires the addition of the multiplicand
to the partial product in AC.
• When the two bits are equal, the partial
product does not change.
• An overflow cannot occur because the
addition and subtraction of the multiplicand
follow each other.
• As a consequence, the two numbers that are
added always have opposite signs, a condition
that excludes an overflow.
35. • The next step is to shift right the partial
product and the multiplier (including bit
Qn+1).
• this is an arithmetic shift right(ashr) operation
which shifts AC and QR to the right and leaves
the sign bit in AC unchanged.
• The sequence counter is decremented and the
computational loop is repeated n times.
37. Booth Multiplication Example
Multiplier : QR=10011=2’s complement of(10011)=
01101=13
Multiplicand : BR=10111=2’s complement of
(10111)=01001=9
-13*-9=117
117 in binary : 00011 10101
The 10 bit product appears in AC and QR and is
positive.
The final value of Qn+1 is the original sign bit of the
multiplier and should not be taken as part of the
product.
38.
39.
40. 2015
• Explain function of booths algorithm and
multiply (+15)x(-13) using general
multiplication algorithm of Booth
algorithm.(6.5 marks)
41. Multiplicand : BR=01111 (+15)
Multiplier : QR=01101=2’s complement of
(01101)=10011= (-13)
15*-13=-195
195 in binary : 11000011
195 in binary (2’s complement): 11001 11101
The 5 bit product appears in AC and QR and is
positive.
The final value of Qn+1 is the original sign bit of
the multiplier and should not be taken as part
of the product.
43. 2014
Show step by step multiplication process using
Booth algorithm when the following binary
numbers are multiplied. Assume 5 bit registers
that hold singed numbers:
1. (+5)x(-3)
44. Multiplicand : BR=00101 (+5)
Multiplier : QR=00011=2’s complement of
(00011)=11101= (-3)
+5*-3=-15
15 in binary : 0000 1111
15 in binary (2’s complement): 1111 0001
The 5 bit product appears in AC and QR and is
positive.
The final value of Qn+1 is the original sign bit of
the multiplier and should not be taken as part
of the product.
46. 2014
Show step by step multiplication process using
Booth algorithm when the following binary
numbers are multiplied. Assume 5 bit registers
that hold singed numbers:
(-5)x(-3)
47. Multiplicand : BR=000101=2’s complement of
(000101)=111011(-5)
Multiplier : QR=00011=2’s complement of
(00011)=11101= (-3)
-5*-3=+15
15 in binary : 0000 1111
The 5 bit product appears in AC and QR and is
positive.
The final value of Qn+1 is the original sign bit of
the multiplier and should not be taken as part
of the product.
50. 2016
Using Booths algorithm, illustrate the sequence
of steps in a tabular fashion, when 11101 is
multiplied with 10111.
51. Multiplicand : BR=11101=2’s complement
of(11101)= 00011=3
Multiplier : QR=10111=2’s complement of
(10111)=01001=9
-3*-9=27
27 in binary : 11011
The 5 bit product appears in AC and QR and is
positive.
The final value of Qn+1 is the original sign bit of
the multiplier and should not be taken as part
of the product.
53. Array Multiplier in Digital Logic
• An array multiplier is a digital combinational
circuit used for multiplying two binary
numbers by employing an array of full adders
and half adders.
• This array is used for the nearly simultaneous
addition of the various product terms
involved.
• To form the various product terms, an array of
AND gates is used before the Adder array.
54. • The multiplicand bits are b1 and b0, the
multiplier bits are a1 and a0, and the product
is c3c2c1c0
• The first partial product is formed by
multiplying a0 by b1,b0.
• The multiplication of two bits such as a0 and
b0 produces a 1 if both bits are 1;otherwise,it
produces a 0.
• This is identical to an AND operation and can
be implemented with an AND gate.
• As shown in diagram first partial product is
formed by means of two AND gates.
55. • The second partial product is formed by
multiplying a1 by b1b0 and is shifted one
position to the left.
• The two partial product are added with two
half-adder circuit.
• Least significant bit of product does not have
to go through an adder since it is formed by
the output of the first AND gate.
58. Note
• For j multiplier bits and k multiplicand bits we
need jxk AND gates and (j-1) k bit adders to
produce a product of j+k bits
• Example : j=2 and k=2
• 2x2=4 AND gates
• 2-1=1 2 bit adder
• 2+2=4 bits product (c3 c2 c1 c0)
59. • A second example, consider a multiplier circuit
that multiplies a binary number of four bits
with a number of three bits.
• let the multiplicand be represented by
b3b2b1b0 and the multiplier by a2a1a0.
• Since k=4 and j=3,we need 12 AND gates and
two(j-1=3-1=2) 4 bit adders to produce a
product of seven bits.
• The logic diagram of the multiplier is shown in
fig (next slide).
63. Division Algorithm
• The divisor B consists of five bits and the
dividend A, of ten bits.
• The five most significant bits of the dividend
are compared with the divisor.
• Since the 5-bit number is smaller than B, we
try again by taking the six most significant bits
of A and compare this number with B.
• The 6th bit number is greater than B, so we
place a 1 for the quotient bit in the sixth
position above the dividend.
• The divisor is then shifted once to the right
and subtracted from the dividend.
64. • The difference is called the partial reminder
because the division could have stopped here
to obtain a quotient of 1 and a remainder
equal to partial reminder.
• The process is continued by comparing a
partial remainder with the divisor.
• If the partial remainder is greater than or
equal to the divisor, the quotient bit is equal
to 1.
• the divisor is then shifted right and
subtracted from the partial remainder.
65. • If the partial remainder is smaller than the
divisor, the quotient bit is 0 and no
subtraction is needed.
• The divisor is shifted once to the right in any
case.
• Note that the result gives both a quotient and
a remainder.
70. Hardware Implementation
• Instead of shifting the divisor to the right, the
dividend, or partial remainder, is shifted to
the left, thus leaving the two numbers in the
required relative position.
• Subtraction may be achieved by adding A to
the 2’s complement of B.
71. • The divisor is stored in the B register and the
double-length dividend is stored in register A and
Q.
• The divided is shifted to the left and the divisor is
subtracted by adding it’s 2’s complement value.
• The information about the relative magnitude is
available in E
• If E=1,it signifies that A>=B.
• A quotient bit 1 is inserted into Qn and the partial
remainder is shifted to the left to repeat the
process.
• If E=0, it signifies that A<B so the quotient in Qn
remains a 0(inserted during the shift).
72. • The value of the B is then added to restore the
partial remainder in A to its previous value
• The partial remainder is shifted to the left and
the process is repeated again unit all five
quotient bits are formed.
• Note while the partial remainder is shifted
left, the quotient bits are shifted also and
after five shifts, the quotient is in Q and the
final remainder is in A.
76. 2019
• What is the need of input output interface(5
marks)
77. Input-Output Interface
• Input-output interface provides a method for
transferring information between internal
storage and external I/O devices
• Peripherals connected to a computer need
special communication links for interfacing
them with the central processing unit.
• The purpose of the communication link is to
resolve the differences that exist between the
central computer and each peripheral.
79. To resolve these differences, computer systems
include special hardware components between
CPU and peripherals to supervise and
synchronize all input and output transfers.
These components are called interface units.
80. I/O Bus and Interface Modules
• A typical communication link between the
processor and several peripherals is shown in
diagram.
81. I/O Bus and Interface Modules
• The I/O bus consists of data lines, address
lines, and control lines.
• Each peripheral device has associated with it
an interface unit.
• Each interface decodes the address and
control received from the I/O bus, interprets
them for the peripheral, and provides signals
for the peripheral controller.
• Each peripheral has its own controller that
operates that particular devices.
82. • For example: the printer controller controls
the paper montion, the print timing, and the
selection of printing characters.
• A controller may be physically integrated with
the peripheral.
• I/O bus from the processor is attached to all
peripheral interface.
• To communicate with a particular device, the
processor places a device address on the
address lines.
• Each interface attached to the I/O bus
contains an address decoder that monitor the
address lines.
83. • When the interface detects its own address,
it activates the path between the bus lines
and the device that it controls.
• All peripherals whose address does not
correspond to the address in the bus are
disabled by their interface.
Four types of commands that an interface may
receive :
1. Control command
2. Status command
3. Data output command
4. Data input command
84. 1. Control command
• A control command is issued to activate the
peripheral and to inform it what to do.
• For example, a magnetic tape unit may be
instructed to backspace the tape by one
record, to rewind the tape, or to start the tape
moving in the forward direction.
• The particular control command issued
depends on the peripheral, and each
peripheral receives its own distinguished
sequence of control commands, depending on
its mode of operation.
85. 2. Status command
A status command is used to test various status
conditions in the interface and the
peripheral.
For example: the computer may wish to check
the status of the peripheral before a transfer
is initiated.
During the transfer, one or more errors may
occur which are detected by the interface.
These errors are designed by setting bits in a
status register that the processor can read at
certain intervals.
86. 3.Data output
• A data output command causes the interface to
respond by transferring data from the bus into one of
its registers.
• Consider an example with a tape unit.
• The computer starts the tape moving by issuing a
control command.
• The processor then monitors the status of the tape by
means of a status command.
• When the tape is in the correct position, the processor
issues a data output command.
• The interface responds to the address and command
and transfers the information from the data lines in the
bus to its buffer register.
• The interface then communicates with the tape
controller and sends the data to be stored on tape.
87. The data input command is the opposite of
data output.
The interface receives an item of data from the
peripheral and places it in its buffer register.
The processor checks if data are available by
means of a status command and then issue a
data input command.
The interface places the data on the data lines,
where they are accepted by the processor.
4.Data input
88. 2016
• What is the difference between isolated I/O
and memory mapped I/O? What are the
advantage and disadvantage of each?(2.5
marks)
89. Isolated versus Memory Mapped I/O
• As a CPU needs to communicate with the various
memory and input-output devices (I/O) as we
know data between the processor and these
devices flow with the help of the system bus.
• There are three ways in which system bus can be
allotted to them :
1. Separate set of address, control and data bus to
I/O and memory.
2. Have common bus (data and address) for I/O
and memory but separate control lines.
3. Have common bus (data, address, and control)
for I/O and memory.
90. • In first case it is simple because both have
different set of address space and instruction
but require more buses.
91. 1. Isolated I/O
Then we have Isolated I/O in which we Have
common bus(data and address) for I/O and
memory but separate read and write control lines
for I/O.
So when CPU decode instruction then if data is for
I/O then it places the address on the address line
and set I/O read or write control line on due to
which data transfer occurs between CPU and I/O.
As the address space of memory and I/O is
isolated and the name is so.
The address for I/O here is called ports.
Here we have different read-write instruction for
both I/O and memory
93. 2. Memory Mapped I/O
• In this case every bus is common due to which
the same set of instructions work for memory
and I/O.
• Hence we manipulate I/O same as memory
and both have same address space, due to
which addressing capability of memory
become less because some part is occupied by
the I/O.
94. There is no separate IN,OUT and MOV
Instruction used to manipulate the memory can be used for I/O
devices.
Isolated I/O has 1
address space for
Memory and I/O
98. Asynchronous Data Transfer
• The transmitter transmits the data byte at any
instance of time.
• Only 1 byte is send at a time
• There is ideal time between 2 data bytes.
• Transmitter and receiver operates at different
clock frequencies.
• Example : Processor can send data any time to
I/O and vice versa because clock frequency of
both are different .
99. Asynchronous Data Transfer
• Asynchronous data transfer between two
independent units requires that control
signals be transmitted between the
communicating units to indicate the time at
which data is being transmitted.
• One way of achieving this is by means of a
strobe pulse supplied by one of the units to
indicate to the other unit when the transfer
has to occur.
100. • Another method commonly used is to
accompany each data item being transferred
with a control signal that indicates the
presence of data in the bus.
• The unit receiving the data item responds
with another control signal to acknowledge
receipt of the data.
• This type of agreement between two
independent units is referred to as a
handshaking
101. Strobe Control
• The strobe may be activated by either the source
or the destination unit
• Diagram shows a source-initiated transfer.
• The data bus carries the binary information from
source unit to the destination unit.
• The strobe is a single line that informs the
destination unit when a valid data word is
available in the bus
Control signal
Only valid data
102. The source unit first places the data on the data bus
The information on the data bus and the strobe
signal remain in the active state for a sufficient time
period to allow the destination unit to receive the
data
The destination uses falling edge of the strobe pulse
to transfer the contents of the data bus into one of
its internal registers.
104. EXPLANATION
Previous slide shows a data transfer initiated by
the destination unit.
In this case, destination unit activates the
strobe pulse, informing the source to provide
the data bus.
The source unit responds by placing the
requested binary information on the data bus.
The data must be valid and remain in the bus
long enough for the destination unit to accept
it.
105. EXPLANATION
The falling edge of the strobe pulse can be used
again to trigger a destination register
The destination unit then disables the strobe.
The source removes the data from the bus after
a predetermined time interval .
106. Handshaking
• The Dis-advantage of the strobe is that the
source unit that initiates the transfer has no way
of knowing whether the destination unit has
actually received the data item that was placed
in the bus.
• Similarly, a destination unit that initiates the
transfer has no way of knowing whether the
source unit has actually placed the data on the
bus.
• The handshake method solves this problem by
introducing a second chance control signal that
provides a reply to the unit that initiates the
transfer
107. Two wire control:
One control line is the same direction as the
data flow in the bus from the source to the
destination.
It is used by source unit to inform the
destination unit whether there are valid data
in the bus.
The other control line is in the other direction
from the destination to the source.
It is used by the destination unit to inform the
source whether it can accept data.
109. 1. The source unit initiates the transfer by
placing the data on the bus and enabling its
data valid signal.
2. The data accepted signal is activated by the
destination unit after it accept the data from
the bus.
3. The source unit then disables its data valid
signal, which invalidates the data on the bus.
4. The destination unit then disables its data
accepted and the system goes into its initial
state.
110. The source does not send the next data item
until after the destination unit shows its
readiness to accept new data by disabling its
data accepted signal.
111. Destination initiated transfer using
handshaking
• The destination-initiated transfer using
handshaking lines is shown in diagram :
112.
113. • The name of the signal generated by the
destination unit has been changed to ready
for data to reflect its new meaning.
• The source unit in this case does not place
data on the bus until after it receives the
ready for data signal from the destination
unit.
• From there on, the handshaking procedure
follows the same pattern as in the source-
initiated case.
114. 1. The destination unit initiates the transfer by
enabling its ready for data signal
2. The source places the data on the bus and
enabling its data valid signal
3. The destination unit accept the data from
bus and then disables its ready for data signal
4. The source unit then disables its data valid
signal and invalidates the data on bus.
115.
116. Mode of Transfer
• Data transfer between the central computer
and I/O devices may be handled in a variety of
modes.
• Some mode use the CPU as an intermediate
path; others transfer the data directly to and
from the memory unit.
117. Mode of Transfer
• Data transfer to and from peripherals may be
handled in one of the three possible modes:
1. Programmed I/O
2. Interrupt initiated I/O
3. Direct memory access(DMA)
118. 1. Programmed I/O
• In the program I/O method, the CPU stays in a
program loop until the I/O unit indicates that
it is ready for data transfer.
• This is time consuming process since it keeps
the processor busy needlessly.
• When the interface determines that the
device is ready for data transfer, it generates
an interrupt request to the computer.
• Transfer of data under programmed I/O is
between CPU and peripheral.
119. Example of Programmed I/O
• Example of data transfer from an I/O device
through an interface into CPU is shown in fig.
• The device transfers bytes of data one at a time
as they are available
• When a byte of data is available, the device
places it in the I/O bus and enables its data valid
line.
• The interface accepts the byte into its data
register and enable the data accepted line.
• The interface sets a bit in the status register that
we will refer to as an F or flag bit.
• The device can now disable the data valid line,
but it will not transfer another byte until the data
accepted line is disabled by the interface.
120. • A program is written for the computer to
check the flag in the status register to
determine if a byte has been placed in the
data register by the I/O device.
• This is done by reading the status register into
a CPU register and checking the value of the
flag bit.
• If the flag is equal to 1,the CPU reads the
data from the data register.
• The flag bit is then cleared to 0 by enabling
the CPU or the interface, depending on how
the interface circuits are designed.
121. • Ones the flag is cleared, the interface
disables the data accepted line and the
device can then transfer the next data byte.
122. Transfer of each byte requires three
instruction
1. Read the status register
2. Check the status of the flag bit and branch to
step 1 if not set or to step 3 if set
3. Read the data register
124. 2. Interrupt initiated I/O
• An alternative to the CPU constantly monitor
the flag is to let the interface inform the
computer when it is ready to transfer data.
• This mode of transfer uses the interrupt
facility
• While the CPU is running a program, it does
not check the flag.
• However when the flag is set, the computer is
interrupted from the current program and is
informed of the fact that the flag has been
set.
125. • The CPU deviates from what it is doing to
take care of input or output transfer.
• After the transfer is completed, the computer
returns to the previous program to continue
what it was doing before the interrupt.
126. 2016
• Explain in details Daisy chain priority
interrupt scheme(5 marks)
2015
Explain the difference between the daisy chain
priority and parallel priority interrupt. Draw the
diagram to explain their working?(6.5 marks)
127. • To summarize, when I/O devices are ready for I/O
transfer, they generate an interrupt request signal
to the computer.
• The CPU receives this signal, suspends the
current instructions it is executing and then
moves forward to service that transfer request.
• But what if multiple devices generate interrupts
simultaneously.
• In that case, we have to have a way to decide
which interrupt is to be serviced first.
• In other words, we have to set a priority among
all the devices for systemic interrupt servicing.
Priority Interrupts | (Daisy Chaining)
128. • The concept of defining the priority among
devices so as to know which one is to be
serviced first in case of simultaneous requests
is called priority interrupt system.
• This could be done with either software or
hardware methods.
129. HARDWARE METHOD –Daisy-Chaining
• This method establishes priority consists of a
serial connection of all devices that request
an interrupt.
• The device with then highest priority is
placed in the first position, followed by
lower-priority devices up to the device with
the lower priority, which is placed last in the
chain.
• The interrupt request line is common to all
devices and forms a wired logic connection.
130.
131. Daisy-Chaining Priority
• A device with a 0 in its PI(Priority Input) input
generates a 0 in its P0(Priority Output) output to
inform the next-lower priority device that the
acknowledge signal has been blocked.
• A device that is requesting an interrupt and has
a 1 in its PI input will intercept the acknowledge
signal by placing a 0 in its P0 output.
• If the device does not have pending interrupts, it
transmits the acknowledge signal to the next
device by placing a 1 in its P0 output
132. • Thus the device with PI=1 and PO=0 is the
one with the highest priority that is
requesting an interrupt, and this device
places its VAD on the data bus.
• The daisy chain arrangement gives the highest
priority to the device that receives the
interrupt acknowledge signal from the CPU.
• The farther the device is from the first
position, the lower is its priority.
133. Parallel Priority Interrupt
• The parallel priority interrupt method uses a
register whose bits are set separately by the
interrupt signal from each device.
• Priority is established according to the position
of the bits in the register
• In addition to the interrupt register, the circuit
may include a mask register whose purpose is to
control the status of each interrupt request
• The mask register can be programmed to disable
lower-priority interrupts while a higher-priority
device is being served.
• It can also provide a facility that allows a high-
priority device to interrupt the CPU while a low-
priority device is being serviced.
134. • The magnetic disk, being a high-speed device is
given a highest priority.
• The printer has the next priority, followed by a
character reader and a keyboard.
• The mask register has the same number of bits as
the interrupt register
• By means of program instructions, it is possible to
set or reset any bit in the mask register.
• Each interrupted bit and its corresponding mask
bit are applied to an AND gate to produce the
four inputs to a priority encoder.
• In this way a interrupt is recognized only if its
corresponding mask bit is set to 1 by the
program.
136. • Suppose keyboard and disk interrupts for CPU
now mask bit of both keyboard and disk will
be set to 1
• AND operation is performed with values of
interrupt register and mask register
• Disk= 1.1=1
• Keyboard=1.1=1
• But as Disk has high priority over keyboard so
disk interrupt’s and get the CPU.
137.
138. The logic of the priority encoder is such that if
two or more inputs arrive at the same time, the
input having the highest priority will take
precedence.
The truth table of a four input priority encoder is
given in previous slide.
The x’s in the table designate don’t care
conditions.
Input I0 has the highest priority; so regardless
of the value of other inputs, when this input is
1, the output generates an output xy=00.
139. • I1 has the next priority level.
• The output 01 if I1=1 provided that
I0=0,regardless of the values of the other two
low-priority inputs.
• The output for I2 is generated only if highest-
priority inputs are 0, and so on down the
priority level.
• The interrupt status IST is set only when one
or more inputs are equal to 1.
• If all inputs are 0,IST is cleared to 0 and the
other outputs of the encoder are not used so
they are marked with don’t care conditions.
140. • This is because the vector address is not
transferred to the CPU when IST=0.
• The Boolean function listed in the table
specify the internal logic of the encoder.
141. Interrupt Cycle
• The interrupt enable flip flop IEN can be set or cleared
by program instructions.
• When IEN is cleared, the interrupt request coming
from IST is neglected by the CPU.
• The program-controlled IEN but allows the
programmer to choose weather to use the interrupt
facility.
• If an instruction to clear IEN has been inserted in the
program, it means that the user does not want his
program to be interrupted.
• An instruction is set IEN indicates that the interrupt
facility will be used while the current program is
running.
142. • The output of the priority encoder is used to
form part of the vector address for each
interrupt source.
• The other bits of the vector address can be
assigned any value
• For example, the vector address can be
formed by appending six zeros to the x and y
output of the encoder.
• With this choice the interrupt vector for the
four I/O devices are assigned binary numbers
0,1,2 and 3
143. 2018
• What is DMA? Draw and explain DMA controller
in details (12.5 marks)
2019
• Discuss DMA. Discuss controller and DMA
transfer with block diagram?(6.5marks)
2016
Explain DMA transfer in a computer system
2015
Explain DMA control with the help of block
diagram(6 marks)
2014
Explain DMA. Discuss DMA controller using
suitable block diagram(7.5 marks)
144. DMA
• The transfer of data between a fast storage
device such as magnetic disk and memory is
often limited by the speed of the CPU
• Speed of CPU is fast and speed of I/O devices are
slow.
• Removing the CPU from the path and letting the
peripheral device manage the memory buses
directly would improve the speed of transfer.
• The CPU may be placed in the idle state in a
variety of ways so that CPU can perform other
important task.
145. • One common method extensively used in
microprocessor is to disable the buses
through special control signals.
• Two control signals in the CPU that facilitate
the DMA transfer.
• The bus request(BR) input is used by the DMA
controller to request the CPU grant the control
of buses.
• When this input is active, the CPU terminates
the execution of the current instruction and
places the address bus, data bus and read and
write lines into a high impedance state.
146. • CPU activates the bus grant (BG) output to
inform the external DMA that the buses are in
high impedance state.
• The DMA that originate the bus request can
now take control of buses to conduct memory
transfer without processor intervention.
• When the DMA terminates the transfer, it
disables the bus request line.
• The CPU disables the bus grant, takes control
of the buses, and return to its normal
operation.
148. DMA Controller
• The DMA controller needs the usual circuit of an
interface to communicate with the CPU and I/O
device.
• In addition, it needs an address register, a word
count register and a set of address lines.
• The address register and address lines are used
for direct communication with the memory.
• The word count register specifies the number of
words that must be transferred.
• The data transfer may be done directly between
the device and memory under control of the
DMA.
150. EXPLANATION
• The register in the DMA are selected by the CPU
through the address bus by enabling the DS and
RS inputs.
• The RD and WR inputs are bidirectional
• When the BG(bus grant) input is 0, the CPU can
communicate with the DMA register through the
data bus to read from or write to the DMA
register
• When BG=1, the CPU has relinquished the buses
and the DMA can communicate directly with the
memory by specifying an address in the address
bus and activating the RD or WR control.
151. • The DMA controller has three registers: an
address register, a word count register and a
control register.
• The address register contains an address to
specify the desired location in memory.
• The address bits go through bus buffers into
the address bus
• The address register is incremented after each
word that is transferred to memory.
• The word count register holds the number of
words to be transferred.
152. • This register is decremented by one after each
word transfer and internally tested for zero.
• The control register specifies the mode of
transfer.
• All register in the DMA appear to the CPU as I/O
interface register.
• Thus the CPU can read from or write into the
DMA registers under program control via the data
bus.
• DMA is first initialized by the CPU.
• After that, the DMA starts and continue to
transfer data between memory and peripheral
unit until an entire block is transferred .
153. • The CPU initializes the DMA by sending the
following information through the data bus:
1. The starting address of the memory block
where data are available or where data are to
be stored(for write).
2. The word count, which is the number of
words in the memory block.
3. Control to specify the mode of transfer such
as read or write.
4. A control to start the DMA transfer.
154. • The starting address is stored in the address
register.
• The word count is stored in the word count
register.
• Control information in the control register
• Once the DMA is initialized, the CPU stops
communicating with the DMA unless it
receive an interrupt signal or if it wants to
check how many words have been transferred.
156. Explanation
• The CPU communicate with the DMA through the
address and data buses as with any interface unit.
• The DMA has its own address, which activates
the DS and RS lines.
• The CPU initializes the DMA through the data
bus.
• Ones the DMA receives the start control
command, it can start transfer between the
peripheral devices and the memory.
• When the peripheral device sends a DMA
request, the DMA controller activates the BR
line, informing the CPU to relinquish the buses.
157. • The CPU responds with its BG line, informing
the DMA that its buses are disabled.
• The DMA then puts the current value of its
address register into the address bus, initiates
the RD or WR signal, and sends a DMA
acknowledge to the peripheral device.
• RD and WR lines in the DMA controller are
bidirectional.
• The direction of transfer depends on the
status of the BG line.
158. • When BG=0, the RD and WR are input lines
allowing the CPU to communicate with the
internal DMA registers.
• When BG=1, the RD and WR are output lines
from the DMA controller to the random-access
memory to specify the read or write operation
for the data.
• When the peripheral device receives a DMA
acknowledge, it puts a word in the data bus(for
write) or receive a word from the data bus(for
read).
• Thus the DMA controls the read or write
operations and supplies the address for the
memory
159. • For each word that is transferred, the DMA
increments its address register and
decrements its word count register.
• If the word count register reaches zero, the
DMA stops any further transaction and
removes its bus request.
• It also informs the CPU of the termination by
means of an interrupt.
• When the CPU responds to the interrupt, it
reads the content of the word count register.
160. • The zero value of this register indicates that
all the words were transferred successfully.
• The CPU can read this register at any time to
check the number of words already
transferred.