



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A homework assignment for the introduction to embedded computer systems course (cpe/ee 323) focusing on binary and hexadecimal number conversions, arithmetic operations using two's complement, and ieee floating point conversions.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Problem #1 (20 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) CA03_2F0D (c) 3, (d) 0110.1011.0010.1100.1011.0100.0010. (e) 43.28.99.
(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).
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 Sign-and-magnitude (a) A223 41507 -24029 - (b) 01A (c) 4089 (d) 22FF (e) FF
(a) unsigned: A223 16 = 1016 3 + 216 2 + 216 1 + 316 0 = 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 = - sign-and-magnite: -2223 16 = -
(a) Convert the following number from decimal to the IEEE 32-bit floating point. 98.03125 (^10)
(b) Convert the following number from the binary IEEE floating point to decimal. 60E3AB00 (^16)
You would like to store the following variables in memory. Show the content of memory starting from the address 100h assuming (a) a little-endian architecture, and (b) a big-endian architecture. Memory is byte-addressable. Note: The DC8 assembly directive is used to allocate and initialize an 8-bit constant; similarly DC16 and DC32 allocate and initialize 16-bit and 32-bit constants, respectively. The .ORG directive moves the location pointer at the specified address (100 hexadecimal in this case).
.ORG 100h myfb DC8 25 ; 8-bit integer mysb DC8 - my345 DC32 345 ; 32-bit integer mym2 DC16 -12, 200 ; 16-bit integer mya DC8 “CPE323” ; ascii string
(a) (b) Address[15:0] HEX Label Memory [7:0] HEX Memory [7:0] HEX 0x0100 0x19 0x 0x