Zakładka z wyszukiwarką danych komponentów
  Polish  ▼
ALLDATASHEET.PL

X  

ST20-C1 Arkusz danych(PDF) 37 Page - STMicroelectronics

Numer części ST20-C1
Szczegółowy opis  Instruction Set Reference Manual
PDF  205 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Producent  STMICROELECTRONICS [STMicroelectronics]
Strona internetowa  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

ST20-C1 Arkusz danych(HTML) 37 Page - STMicroelectronics

Back Button ST20-C1 Datasheet HTML 33Page - STMicroelectronics ST20-C1 Datasheet HTML 34Page - STMicroelectronics ST20-C1 Datasheet HTML 35Page - STMicroelectronics ST20-C1 Datasheet HTML 36Page - STMicroelectronics ST20-C1 Datasheet HTML 37Page - STMicroelectronics ST20-C1 Datasheet HTML 38Page - STMicroelectronics ST20-C1 Datasheet HTML 39Page - STMicroelectronics ST20-C1 Datasheet HTML 40Page - STMicroelectronics ST20-C1 Datasheet HTML 41Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 37 / 205 page
background image
37/205
4 Using ST20-C1 instructions
®
Each
divstep generates four bits of the unsigned quotient, so eight divsteps are
needed for a full 32-bit unsigned division, and will also generate a remainder. The
result of the division is the integer division rounded towards zero (truncated). The
quotient is left in Breg, and the remainder in Creg, so a rotation pops the quotient into
the Areg.
unsign is used to separate the sign from the magnitude of the operands before
performing the division. Division is then performed on the magnitudes, and the signs
of the results may be derived from the signs of the operands.
Overflow can occur only if the divisor (Areg) is zero, or if the dividend (Breg)is
MostNeg and the divisor is -1. divstep does not detect these cases, and does not set
any status bits, so a check should be applied before performing the division.
The following code sequence performs the integer division
a/b. The signed quotient is
left in Areg.
a; b; ldc 0; arot; unsign;
arot; unsign; cj POS;
ldc 0; rot;
divstep; divstep; divstep; divstep;
divstep; divstep; divstep; divstep;
rot; not; adc 1;
j END;
POS:
rot;
divstep; divstep; divstep; divstep;
divstep; divstep; divstep; divstep;
rot;
END:
The following code sequence performs the remainder
a rem b. The signed remainder
is left in Areg.
a; b; ldc 0; rev; unsign;
eqc 2; arot; unsign; cj POS;
divstep; divstep; divstep; divstep;
divstep; divstep; divstep; divstep;
arot; not; adc 1;
j END;
POS:
rot;
divstep; divstep; divstep; divstep;
divstep; divstep; divstep; divstep;
arot;
END:
4.4.3
Saturated arithmetic
In saturated arithmetic, when an overflow or underflow occurs the result is set to the
most positive or most negative possible result respectively, instead of the least signifi-
cant bits of the full result. This ensures that the result is as near as possible to the real
value and prevents glitches caused by wrap-around.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Arkusz danych Pobierz

Go To PDF Page


Link URL



Czy Alldatasheet okazała się pomocna?  [ DONATE ] 

O Alldatasheet   |   Reklama   |   Kontakt   |   Polityka prywatności   |   Link do karty katalogowej    |   Linki   |   Lista producentów
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com