CS 0447 Lecture 22: Division and Floating-Point Representation

28 views1 pages
School
Course
Professor
Division and Floating-Point Representation
- div = how many times can you subtract B from A to get number less than B
- How to binary divde:v
divisor shifted by (n-1)
then check if it fits
if y -> 1
if n -> 0
Considered done when bit sizes of q and dividend are equal
for (n bits in dividend){
quotient << = 1
dividend shifted by right 1 and top bit (of dividend) goes into remainder
if (dividor <= remainder){
}
}
div t0, a0
remainder = HI
quotient = LO
we use mfhi/ mflo to get answers
EXAMPLE:
divisor remainder dividend quotient
101 1011 0
1 0110 0'
- Divide circuit is closely related to multiplier
Biased Notation:
signed number and add a constant
in single precision floats our constant is 127
-127 => 0
signed => biased
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% OFF
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers