Appendix A. Arithmetic Tables for A 4-Bit Machine

In the tables in Appendix A, underlining denotes signed overflow. For example, in Table A–1, 7 + 1 = 8, which is not representable as a signed integer on a 4-bit machine, so signed overflow occurred.

TABLE A–1. ADDITION

Image

The table for subtraction (Table A–2) assumes that the carry bit for a − b is set as it would be for Image, so that carry is equivalent to “not borrow.”

TABLE A–2. SUBTRACTION (ROWCOLUMN)

For multiplication (Tables A–3 and A–4), overflow means that the result cannot be expressed as ...

Get Hacker’s Delight, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.