ee357_hw1_sol

# ee357_hw1_sol - EE 357 Homework 1 Fall 08 Dubois Name: _...

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

EE 357 Homework 1 Fall ’08 Dubois Name: ___________________________________________ Due: Fri. Aug. 29 th by 5PM on blackboard Score: _ /100 _______ Note: Attach all work to receive full credit Data Representation 1.) (20) Each C declaration of the variable x is initialized to a value in decimal. Show that value represented in hex using the appropriate size indicated by the variable type (e.g. char has 1 byte which is 2 hex digits). Do not use a calculator. a. short int x = 130; \$0082 b. short int x = -18765; \$B6B3 c. unsigned char x = 78; \$4E d. int x = 4096; \$00001000 e. char x = -115; \$8D f. int x = -9; \$FFFFFFF7 g. unsigned char x = ‘\$’; \$24 h. short int x = 32767; \$7FFF i. int x = ‘1’; \$00000031 j. char x = -128; \$80 2.) (6) For each of the following C variable types show the maximum (largest) and minimum (smallest) possible values in hex. Maximum Minimum char \$7F \$80 unsigned short int \$FFFF \$0000 int \$7FFFFFFF \$80000000 Arithmetic and Comparison Operations 3.)

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.

## This note was uploaded on 04/11/2009 for the course EE 357 taught by Professor Mayeda during the Fall '08 term at USC.

### Page1 / 2

ee357_hw1_sol - EE 357 Homework 1 Fall 08 Dubois Name: _...

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

View Full Document
Ask a homework question - tutors are online