ee357_hw1

ee357_hw1 - EE 357 Homework 1 Spring 09 Redekopp Name: _...

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

View Full Document Right Arrow Icon
EE 357 Homework 1 Spring ’0 9 ● Redekopp Name: ___________________________________________ Lec: 9:30 / 11:00 Due: Tues. Jan. 20 th in class Score: ________ For this HW, enter your answers on Blackboard. Be sure to follow any formatting instructions. Data Representation 1.) 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 = 1-byte = 2 hex digits). Precede your hex value with the ‘0x’ prefix. Do not use a calculator. [4 pts. each…must have correct size/number of hex digits and value] a. short int x = 13; b. short int x = -32,767; c. unsigned char = 246; d. int x = -4096; e. unsigned char x = 193; f. int x = -1; g. unsigned char x = ‘a’; h. short int x = 40; i. unsigned char x = ‘0’; j. char x = -2; 2.) For each of the following C variable types show the maximum (largest) and minimum (smallest) possible values in hex.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

ee357_hw1 - EE 357 Homework 1 Spring 09 Redekopp Name: _...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online