Computer Arithmetic in Practice - Exercises and Programming is a simple, brief introductory volume for undergraduate and graduate students at university courses interested in understanding the foundation of computers. It is focused on numeric data formats and capabilities of computer to perform basic arithmetic operations. It discusses mainly such topics as: Basic concepts of computer architecture Assembly language programming skills Data formats used to express integer and real numbers Algorithms of basic arithmetic operations Short overview of nonlinear functions evaluation Discussion on limited number representation and computer arithmetic Exercises and programming tasks. This book provides an accessible overview of common data formats used to write numbers in programming languages and how the computer performs four basic arithmetic operations from the point of view of the processor instruction set. The book is primarily didactic in nature, therefore the theoretical information is enriched with many numerical examples and exercises to be solved using a "sheet of paper and a pencil". Answers are provided for most of the tasks. The theoretical discussed issues are illustrated by listings of algorithms presenting the way hot to implement arithmetic operations in low level language. taking. It allows to develop the skills of optimal programming taking into considerations the computer architecture and limitations. Creating software using low level language programming, despite the initial difficulties, gives the ability to control the code and create efficient applications. This allows for effective consolidation of knowledge and acquisition of practical skills, required at the stage of education, mainly a specialist in the field of information technology, electronics, telecommunications, other related disciplines, or at the level of general education with introduction to information technology. It may be also useful for engineers interested in their own professional development and teachers as well. Slawomir Gryś is a university professor at Częstochowa University of Technology, Poland. He has conducted many courses focused on analog electronics, logical devices, foundations of computer architecture and organization, low-level programming techniques in assembly and C languages for embedded systems, image processing and recognition. He is the author or co-author of several scientific monographs, book chapters, academic textbook, patent and more than 60 papers in journals and domestic and international conference proceedings in Poland, Germany, Canada and Australia.
Author(s): Slawomir Gryś
Publisher: CRC Press
Year: 2023
Language: English
Pages: 213
Cover
Half Title
Title Page
Copyright Page
Dedication
Contents
Preface
Chapter 1: Basic Concepts of Computer Architecture
1.1 The 1-bit Logical and Arithmetical Operations
1.2 Architecture of Simple Microprocessor
1.3 Understanding the Instruction Set
1.4 Assembly Language and Tools
Chapter 2: Numbers in Fixed-point Format
2.1 Unsigned Numbers
2.2 Conversion of Unsigned Number to Another Format
2.2.1 Conversion BIN to P-BCD for A < 100DEC
2.2.2 Conversion BIN to P-BCD for A < 256DEC
2.2.3 Conversion BIN to UP-BCD for A < 100DEC
2.2.4 Conversion BIN to UP-BCD for A < 256DEC
2.2.5 Conversion BIN to ASCII for A < 100DEC
2.2.6 Conversion BIN to ASCII for A < 256DEC
2.2.7 Conversion P-BCD to BIN
2.2.8 Conversion P-BCD to UP-BCD
2.2.9 Conversion P-BCD to ASCII
2.2.10 Conversion UP-BCD to BIN
2.2.11 Conversion UP-BCD to P-BCD
2.2.12 Conversion UP-BCD to ASCII
2.2.13 Conversion ASCII to BIN
2.2.14 Conversion ASCII to P-BCD
2.2.15 Conversion ASCII to UP-BCD
2.2.16 Conversion BIN Fraction (num/denom) to BIN Fraction (dot notation)
2.3 Signed Numbers
2.3.1 The Sign-magnitude Representation
2.3.2 Complements - Theory and Its Usage
2.3.3 The 2's Complement Representation
2.4 Conversions and Change of Sign
2.4.1 Change of Sign for 2's Number
2.4.2 Conversion SM to 2's Notation
2.4.3 Conversion 2's Notation to SM
Chapter 3: Basic Arithmetic on Fixed-point Numbers
3.1 Operations on Unsigned Numbers
3.1.1 Working with Natural Binary Code
3.1.2 Working with Packed BCD
3.1.3 Working with Unpacked BCD
3.1.4 Working with Chars in ASCII
3.2 Operations on Signed Numbers
3.2.1 Working with Sign-magnitude
3.2.2 Working with 2's Complement
3.3 Nonlinear Functions
Chapter 4: Numbers in Floating-point Format
4.1 Non-normalized Numbers
4.2 IEEE 754 Standard
4.2.1 Single Precision
4.2.2 Double Precision
4.2.3 Double Extended Precision*
4.2.4 Single Precision
4.2.5 Double Precision
4.2.6 Double Extended Precision
4.3 FPU as a Specialized Arithmetic Unit
4.4 Conversion to Another Radix
Chapter 5: Basic Arithmetic Operations on Floating-point Numbers
5.1 Addition
5.2 Subtraction
5.3 Multiplication
5.4 Division
5.5 Implementations in Assembly Language
Chapter 6: Limited Quality of Arithmetic Operations
6.1 Precision of Number Representation
6.2 Error Propagation
Remarks
1 It applies to operations on numbers in fixed-point format
2 It applies to operations on numbers in floating-point format
3 General remark
References
Book and journals
Appendices
Appendix A. Range of numbers
Appendix B. Numerical Data Types in Some High-level Languages
Appendix C. Solutions to Exercises
Index