主权项 |
1. An apparatus, comprising:
a storage device; and a memory control module coupled to the storage device, the memory control module comprising:
a receive data module configured to receive first data comprising a first integer represented in a two's complement format;a data conversion module coupled to the receive data module and configured to transform the first data to second data responsive to a write request, wherein to transform the first data, the data conversion module is configured to:
determine whether the first integer is greater than or equal to zero;if the first integer is greater than or equal to zero, then calculate a one's complement of the first integer; elseif the first integer is not greater than or equal to zero, then change a most significant bit of the first data to zero;a write data module coupled to the data conversion module and to the storage device, and configured to write the second data into the storage device; anda read data module coupled to the data conversion module and configured to read third data responsive to a read request, wherein the third data comprises inversely transformed second data and wherein the third data is same as the first data. |