Numerical Methods Real-Time and Embedded Systems Programming

Free Download

Authors:

ISBN: 1558512322, 9781558512320

Size: 1 MB (1068252 bytes)

Pages: 512/512

File format:

Language:

Publishing Year:

Category:

Don Morgan1558512322, 9781558512320

Mathematical algorithms are essential for all assembly language and embedded system engineers who develop software for microprocessors. This book describes techniques for developing mathematical routines – from simple multibyte multiplication to finding roots to a Taylor series. All source code is available on disk in MS/PC-DOS format.

Table of contents :
Contents……Page 6
WHY THIS BOOK IS FOR YOU……Page 16
INTRODUCTION……Page 18
CHAPTER 1: NUMBERS……Page 22
Systems of Representation……Page 23
Bases……Page 24
The Radix Point, Fixed and Floating……Page 27
Fixed Point……Page 30
Floating Point……Page 32
Positive and Negative Numbers……Page 33
Microprocessors……Page 36
Buswidth……Page 37
Flags……Page 39
Rounding and the Sticky Bit……Page 40
Addition……Page 41
Multiplication……Page 42
Negation and Signs……Page 43
Shifts, Rotates and Normalization……Page 44
Decimal and ASCII Instructions……Page 45
Unsigned Addition and Subtraction……Page 48
Multiprecision Arithmetic……Page 50
add64: Listing……Page 51
sub64: Listing……Page 52
Signed Addition and Subtraction……Page 53
Decimal Addition and Subtraction……Page 55
Multiplication and Division……Page 57
Signed vs.Unsigned……Page 58
signed-operation: Algorithm……Page 59
signed-operation: Listing……Page 60
Binary Multiplication……Page 61
cmul: Listing……Page 64
A Faster Shift and Add……Page 65
cmul2: Algorithm……Page 66
cmul2: Listing……Page 67
Skipping Ones and Zeros……Page 68
booth: Listing……Page 70
bit-pair: Algorithm……Page 72
bit-pair: Listing……Page 73
Hardware Multiplication: Single and Multiprecision……Page 76
mu132: Algorithm……Page 77
mu132: Listing……Page 78
Error Checking……Page 79
Software Division……Page 80
cdiv: Algorithm……Page 82
cdiv: Listing……Page 83
Hardware Division……Page 84
div32: Algorithm……Page 89
div32: Listing……Page 90
div64: Algorithm……Page 94
div64: Listing……Page 95
CHAPTER 3: REAL NUMBERS……Page 100
Fixed Point……Page 101
Significant Bits……Page 102
Rounding……Page 104
Basic Fixed-Point Operations……Page 107
A Routine for Drawing Circles……Page 110
circle: Listing……Page 113
Bresenham’s Line-Drawing Algorithm……Page 115
line: Algorithm……Page 116
line: Listing……Page 117
Division by Inversion……Page 120
divnewt: Algorithm……Page 123
divnewt: Listing……Page 124
Division by Multiplication……Page 129
divmul: Algorithm……Page 131
divmul: Listing……Page 132
CHAPTER 4: FLOATING-POINT ARITHMETIC……Page 138
What To Expect……Page 139
A Small Floating-Point Package……Page 142
The Elements of a Floating-Point Number……Page 143
Extended Precision……Page 146
fp_add: Algorithm……Page 147
fp_add: Listing……Page 148
The Core Routines……Page 149
Addition and Subtraction: FLADD……Page 151
FLADD: The Prologue.Listing……Page 153
The FLADD Routine Which Operand is Largest? Algorithm……Page 155
The FLADD Routine: Which Operand is Largest? Listing……Page 156
The FLADD Routine: Aligning the Radix Points.Algorithm……Page 157
The FLADD Routine: Aligning the Radix Point.Listing……Page 158
FLADD: The Epilogue.Algorithm……Page 159
FLADD: The Epilogue.Listing……Page 160
flmul: Algorithm……Page 162
flmul: Listing……Page 163
mu164a: Algorithm……Page 166
mu164a: Listing……Page 167
fldiv: Algorithm……Page 169
fldiv: Listing……Page 170
Round: Algorithm……Page 174
Round: Listing……Page 175
CHAPTER 5: INPUT, OUTPUT, AND CONVERSION……Page 178
Decimal Arithmetic……Page 179
Integer Conversion by Division……Page 180
bn_dnt: Algorithm……Page 181
bn_dnt: Listing……Page 182
Integer Conversion by Multiplication……Page 184
dnt_bn: Listing……Page 185
Fraction Conversion by Multiplication……Page 187
bfc_dc: Listing……Page 188
Fraction Conversion by Division……Page 190
Dfc_bn: Algorithm……Page 191
Dfc_bn: Listing……Page 192
Hex to ASCII……Page 194
hexasc: Listing……Page 195
tb_dcbn: Algorithm……Page 197
tb_dcbn: Listing……Page 199
Binary to Decimal……Page 202
tb_bndc: Algorithm……Page 203
tb_bndc: Listing……Page 204
ASCII to Single-Precision Float……Page 207
atf: Algorithm……Page 208
atf: Listing……Page 210
fta: Algorithm……Page 215
Fta: Listing……Page 217
Fixed Point to Single-Precision Floating Point……Page 221
ftf: Algorithm……Page 222
ftf: Listing……Page 223
Single-Precision Floating Point to Fixed Point……Page 226
ftfx: Listing……Page 227
Lookup Tables and Linear Interpolation……Page 232
lg 10: Algorithm……Page 234
lg 10: Listing……Page 235
Dcsin: Algorithm……Page 239
Dcsin: Listing……Page 242
Computing With Tables……Page 248
Pwrb: Algorithm……Page 249
Pwrb: Listing……Page 250
CORDIC Algorithms……Page 252
Circular: Listing……Page 257
Polynomial Evaluations……Page 262
taylorsin: Algorithm……Page 264
taylorsin: Listing……Page 265
Polyeval: Listing……Page 266
Calculating Fixed-Point Square Roots……Page 268
fx_sqr: Listing……Page 269
school_sqr: Algorithm……Page 271
school_sqr: Listing……Page 272
frxp: Algorithm……Page 274
frxp: Listing……Page 275
ldxp: Listing……Page 276
flr: Listing……Page 278
flceil: Algorithm……Page 280
flceil: Listing……Page 281
intmd: Listing……Page 283
Square Roots……Page 284
Flsqr: Algorithm……Page 285
Flsqr: Listing……Page 286
Sines and Cosines……Page 288
flsin: Algorithm……Page 289
Flsin: Listing……Page 290
A: A PSEUDO-RANDOM NUMBER GENERATOR……Page 296
B: TABLES AND EQUATES……Page 310
C: FXMATH.ASM……Page 312
D: FPMATH.ASM……Page 352
E: IO.ASM……Page 388
F: TRANS.ASM AND TABLE.ASM……Page 422
G: MATH.C……Page 490
GLOSSARY……Page 500
INDEX……Page 508

Reviews

There are no reviews yet.

Be the first to review “Numerical Methods Real-Time and Embedded Systems Programming”
Shopping Cart
Scroll to Top