Skip navigation

This solution is for the book I am currently reading. All of my notes and solutions are available at Google Code.

Here is my work for problem 2.28:

We can represent a bit pattern of length w = 4 with a single hex digit. For an
unsigned interpretation of these digits, use Equation 2.12 to fill in the following
table giving the values and the bit representations (in hex) of the unsigned additive
inverses of the digits shown.

      x                   -u/4(x)
-------------------------------------
  Hex   Decimal       Decimal   Hex
-------------------------------------
   0
-------------------------------------
   5
-------------------------------------
   8
-------------------------------------
   D
-------------------------------------
   F
-------------------------------------


Work:

hex: 5
decimal: 5

2^w = 16
-u/4(x) = (2^w - x)
16 - 5 = 11

hex: 8
decimal: 8
16-8 = 8


Answers:

      x                   -u/4(x)
-------------------------------------
  Hex   Decimal       Decimal   Hex
-------------------------------------
   0       0             0       0
-------------------------------------
   5       5            11       B
-------------------------------------
   8       8             8       8
-------------------------------------
   D      13             3       3
-------------------------------------
   F      15             1       1
-------------------------------------



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: