CS 473

HW 0 - Non-Decimal Arithmetic

No Due Date

Converting Unrelated Radixes

Use the division method to convert each of the following numbers from decimal to eight-bit 2's complement hexadecimal numbers (if I were to be obnoxiously pedantic, the phrase "2's complement hexadecimal" would be incorrect. Why?)

  1. 43
  2. -37
  3. 193
For one of the numbers above, the instructions are impossible. Why?

Use the multiplication method to convert each of the following numbers from eight-bit 2's complement binary to decimal.

  1. 00110101
  2. 11011010
  3. 0111
Even though the last number above isn't technically the word size requested, there's no problem converting it. Why?

Converting Between Related Radices

Convert each of the following numbers from binary to hexadecimal.

  1. 00111001
  2. 11000111
  3. 001110
The last number above doesn't have the right number of bits to convert to hexadecimal; again, it doesn't cause us any problem. Why?

Convert each of the following numbers from hexadecimal to binary.

  1. a3f
  2. 01d
  3. aaa

Addition

Perform the following hexadecimal additions. If the operation were performed on an eight-bit microprocessor, what would be the contents of the resulting NZVC condition codes?

1212acac
+12+79+42+ac

Multiplication

Perform the following binary multiplications

1001001110101110
x01101101x10101110

Division

Perform the following binary divisions

  1. 1101111 / 00010110
  2. 1101000 / 110

Last modified: Fri Aug 27 10:06:44 MDT 2004