hw1.s10 - Sign-and-magnitude (a) A223 41507-24029-8739 (b)...

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

CPE/EE 323 Introduction to Embedded Computer Systems Homework I Problem #1 (25 points) Fill in the following table. Show your work as illustrated for (a). Decimal 32-bit binary Hexadecimal number (8 hex digits) 4-byte packed BCD number (a) 12,348 0000.0000.0000.0000.0011.0000.0011.1100 0000_303C 00. 00.30.3? (b) DBF3_23AB (c) 10,245 (d) 0111.0011.0010.1100.1001.0100.0010.1100 (e) 83.29.19.43 (a) 12348/16 = 771 12 771/16 = 48 3 48/16 = 3 0 3/16 = 0 3 12348 10 = 303C 16 = 0000_303C 16 = 0000_0000_0000_0000_0011_0000_0011_1100 2 = 00.00.303? (“?” marks an illegal BCD digit).

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

View Full Document
Problem #2 (25 points) Consider the following 16-bit hexadecimal numbers (second column). Each of these values can be interpreted as an unsigned 16-bit integer, a signed 16-bit integer represented in 2’s complement, or as a sign-and-magnitude integer. Provide the decimal value for each number and interpretation. Show your work as illustrated in (a). 16-bit hex Unsigned int Signed int

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Sign-and-magnitude (a) A223 41507-24029-8739 (b) 81C2 (c) 9689 (d) A2EB (e) 39CD (a) unsigned: A223 16 = 10*16 3 + 2*16 2 + 2*16 1 + 3*16 = 41507 10 signed: A223 16 = 1010.0010.0010.0011 2 => this is a negative number; two’s complement is: 0101.1101.1101.1101 = 5DDD 16 = 24029 10 => A223 16 = -24029 sign-and-magnite: -2223 16 = -8739 Problem #3 (25 points) Consider the following arithmetic operations. Find the results and set the flags C, V, N, and Z accordingly. (a) 8-bit, two’s complement 55 10 + 105 10 (b) 8-bit, two’s complement (-55) 10- 68 10 (c) 16-bit, two’s complement -45 8 – 88 16 (d) 16-bit, two’s complement -AF 16 + 34 10 (e) 16-bit, two’s complement AF 16 + 99 10 Problem #4 (25 points) (a) Convert the following number from decimal to the IEEE 32-bit floating point. 78.03125 10 (b) Convert the following number from the binary IEEE floating point to decimal. 60E3AB00 16...
View Full Document

This note was uploaded on 12/04/2011 for the course CPE 323 taught by Professor Milenkovic during the Spring '10 term at University of Alabama - Huntsville.

Page1 / 4

hw1.s10 - Sign-and-magnitude (a) A223 41507-24029-8739 (b)...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online