{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# HW1_S - 0306-250 Assembly Language Programming Fall 2009...

This preview shows pages 1–3. Sign up to view the full content.

Page 1 of 3 0306-250 Assembly Language Programming Fall 2009 Homework One Solution 1. Convert each of the following decimal integers into its natural binary equivalent. a. 13 Use division-remainder method. 2: Quotient Remainder 6 1 LSB 3 0 1 1 0 1 MSB Therefore, 13 in binary is 1101. (The last remainder is the most significant bit, and the first remainder is the least significant bit). Remember that this process works for all radices —not just binary. b. 44 Again, use division-remainder method. 2: Quotient Remainder 22 0 LSB 11 0 5 1 2 1 1 0 0 1 MSB Therefore, 44 in binary is 101100. 2. Convert the following natural binary integer into its decimal equivalent: 1010110. Add the decimal contribution from each binary digit. 1010110 2 = 1 · 2 6 + 0 · 2 5 + 1 · 2 4 + 0 · 2 3 + 1 · 2 2 + 1 · 2 1 + 0 · 2 0 1010110 2 = 64 + 16 + 0 + 4 + 2 + 0 1010110 2 = 86 10 Alternatively, use the double-dabble method to convert to decimal. 1 0 1 0 1 1 0 x 2 2 +0 = 2 x 2 4 + 1 = 5 x 2 10 +0 = 10 x 2 20 +1 = 21 x 2 42 +1 = 43 x 2 86 +0 = 86

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
0306-250 20091 Homework One Solution Page 2 of 3 3. Perform the following binary addition:
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}