Home Work Assignment 1 (due 06 Feb 2004)

1) Fill in the blanks in the following table:

Dec    Hex    Oct    Bin
10     0x0a   012    00001010
100    0x64   0144   01100100
123
	      015
       0x3c
                     00100011

2) Convert the following decimal numbers to hexadecimal, octal, and binary.

(a)  53
(b)  37
(c)  61
(d)  29

3) Convert the following binary numbers to hexadecimal, octal, and decimal.

(a)  10101011
(b)  01101100
(c)  11011011
(d)  10010010

4) This is a code fragment:

int x = 0;
int y = 6;
int z = 7;

x = --y * z++;

What are the values of x, y, and z after the execution of this code.

5) For each of the following expressions, indicate the order in which the operators will be evaluated by writing a number beneath each operator.

(a)  a - b + c - d 
(b)  a + b / c * d 
(c)  a % b / c * d 
(d)  (a + b) * (c / d) % e 
(e)  a = b = c = d = 1 

General Guidelines

Your home work must have a cover sheet in the following format:

The home work has to be turned to the TA during the discussion session on Friday, 06 February 2004.