Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A0
(1)
(1)
(3) Test P; set A0
If P is negative,
1a. Shift (P,A) one bit left.
2a. Add the content of register B to P.
else
1b. Shift (P,A) one bit left.
2b. Subtract the contents of register B from P.
3. If P is negative, set the low-order bit of A to 0,
otherwise set it to 1.
Repeat n time.
0000000000000001.1100000000000000
=1+1/2+1/4=1.75
• Weights after binary point are ½, ¼, 1/8, ….
Use two numbers (a, b) to represent fraction a/b.
• Disadvantage of the above representations: range of
values too narrow.
And gate
Or gate
2i+1 2i 2i-1
0 0 0 0
0 0 1 +b
0 1 0 +b
0 1 1 +2b
1 0 0 -2b
1 0 1 -b
1 1 0 -b
1 1 1 0