number mapping

8 bit 2’s complement form:
0       0
1       1
127   0x7F
-1      0xFF
-128  0x80
if there are 16 levels, 0 ~ 15. We can do this mapping for positive values:  reg_val = (usr_val * 15) / 128 + 1 for positive numbers.
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