Unformatted text preview: stores the binary representation of a negative number with the bits inverted. Two’s compliment is the same, except that a negative number has its bits inverted and then one is added (for reasons of ef f ciency in hardware implementation). This representation is the physical implementation of an ADT de f ned by the normal arithmetic operations, declarations, and other support given by the programming language for integers. 1.6 An ADT for twodimensional arrays might look as follows. Matrix add(Matrix M1, Matrix M2); Matrix multiply(Matrix M1, Matrix M2); Matrix transpose(Matrix M1); void setvalue(Matrix M1, int row, int col, int val); int getvalue(Matrix M1, int row, int col); List getrow(Matrix M1, int row);...
View
Full
Document
This note was uploaded on 12/27/2011 for the course MAP 2302 taught by Professor Bell,d during the Fall '08 term at UNF.
 Fall '08
 BELL,D

Click to edit the document details