Homework Problems

1.  Express the following in the format requested.  (Note: all numbers are expressed in decimal)

    a. 379 as an unsigned 16-bit binary integer

    b. express the answer to a) in hexadecimal rather than binary

    c. 379 as a 16-bit sign-magnitude signed binary integer, expressed in hex

    d. -476 as a 16-bit sign-magnitude signed binary integer, expressed in hex

    e. 379 as a 16-bit 2's-complement signed binary integer, expressed in hex

    f. -476 as a 16-bit 2's-complement signed binary integer, expressed in hex

    g. 14 as an offset-127 value, expressed in hex


2. What is the decimal equivalent of the following (expressed in hex)? a. the unsigned binary integer 000012AF b. the sign-magnitude binary integer 80001876 c. the 2's-complement binary integer FFFFFFFF

3. Use binary addition to compute the sum of two hex numbers, ABCD + 1234 = ? (hint: first convert the binary, add, then convert back to hex)

Solutions