Introduction to Computer Data Representation

Introduction to Computer Data Representation introduces readers to the representation of data within computers. Starting from basic principles of number representation in computers, the book covers ...
[view complete introduction]

US $

*(Excluding Mailing and Handling)

Basic Arithmetic and Logic

Pp. 45-75 (31)

Peter Fenwick


Given that quantities may be represented as bit patterns within the computer, how may these patterns be manipulated to achieve useful results? We look first at the "basic" operations of addition and subtraction in the various binary number representations, extending to addition of multiple-precision values and decimal addition. Then we examine the logical operations, where the bits are "bits", with no numerical significance. Operations here include AND, OR, NOT, XOR, shifting of various types, bit-field operations and, finally, parity.


Binary addition of signed values, subtraction by complement addition, multiple precision addition, decimal addition, logical operations, shift operations, bit-field operations, parity.


The University of Auckland (Retired) New Zealand