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)

Image

For multiplication (Tables A–3 and A–4), overflow means that the result cannot be expressed as a 4-bit quantity. For signed multiplication (Table A–3), this is equivalent to the first five bits of the 8-bit result not being all 1’s or all 0’s.

TABLE A–3. SIGNED MULTIPLICATION

Image

TABLE A–4. UNSIGNED MULTIPLICATION

Image

Tables A–5 and A–6 are for conventional truncating division. Table A–5 shows a result of 8 with overflow for the case of the maximum negative number divided by –1, but on most machines the result in this case is undefined, or the operation is suppressed.

TABLE A–5. SIGNED SHORT DIVISION (ROW ÷ COLUMN)

Image

TABLE A–6. UNSIGNED SHORT DIVISION (ROW ÷ COLUMN)

Image

Tables A–7 and A–8 give the remainder associated with conventional truncating division. Table A–7 shows a result of 0 for the case of the maximum negative number divided by –1, but on most machines the result for this case is undefined, or the operation is suppressed.

TABLE A–7. REMAINDER FOR SIGNED SHORT DIVISION (ROW ÷ COLUMN)

Image

TABLE A–8. REMAINDER FOR UNSIGNED SHORT DIVISION (ROW ÷ COLUMN)

Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset