p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Assembly Language (http://p2p.wrox.com/forumdisplay.php?f=161)
-   -   Error in Figure 7-9? (http://p2p.wrox.com/showthread.php?t=60602)

 davx92 July 27th, 2007 06:50 PM

Error in Figure 7-9?

I'm guessing there's an error on Page 179 Figure 7-9. In that figure shouldn't Byte2 be displayed as 8 bits? Also on that figure shouldn't decimal value 8 and 9 be represented as 1000 and 1001 (in binary form) instead of 1000 and 010001? Is this an error or i just got it wrong? Thanks for your time.

 Silvine January 10th, 2010 07:41 AM

Quote:
 Originally Posted by davx92 (Post 60602) I'm guessing there's an error on Page 179 Figure 7-9. In that figure shouldn't Byte2 be displayed as 8 bits? Also on that figure shouldn't decimal value 8 and 9 be represented as 1000 and 1001 (in binary form) instead of 1000 and 010001? Is this an error or i just got it wrong? Thanks for your time.
I am looking at page 179 right now.

Byte 1
00010100
Byte 2
10001001

Both are 8-bit values.

How ever, to convert the binary to decimal - follow this example,

16368421
00010100

16+ 4 = 18

16368421
10001001
1+8+128 = 137

= 13,718?
= 18,137?
You are right, the binary is wrong. But, just ignore that and take a look at objdump output to figure out the correct binary values. OR write a program that outputs binary from decimal input!

 All times are GMT -4. The time now is 04:17 AM.