HARRAN UNIVERSITY

DEPARTMENT OF COMPUTER ENGINEERING

0504305 INTRODUCTION TO COMPUTER SCIENCE

HOMEWORK #2

Due Date: Tuesday, 04/03/2008

HW will be prepared in English on A4 paper

1. Number Systems: Signed Numbers

Fill out the following table by calculating the values of the numbers in desired form. You should decide the minimum number of bits for each number

Decimal Sign-Magnitude   2's Complement
(-47) 10 ? ?
(-237) 10 ? ?
(+17) 10 ? ?
(+132)10 ? ?
? 01011001 ?
? 11001011 ?
? ?

10110101

? ?

01101101

2.Arithmetical operations in 2's Complement

Make the calculations given below in 2's Complement Binary number system . Check each result for OVERFLOW.Explain the results.

  5-4=? (3 bit)                                             10-13=? (5 bit)

7+5=? (4 bit)                                          -12-14=? (5 bit)

-73-(+60)=? (8 bit)                                     101-14=? (8 bit)

3.Definitions

            What is OVERFLOW?

            Define 3 fundamental Logic operations and  give their Truth Table.

4. Fractions

Make the following conversions. Check the second lecture notes for conversion from Decimal to Binary.

  (1101,1101) 2  =( ?)10                35,253=( ? ) 2    

  (0110,0110) 2  =( ?)10                42,624=( ? ) 2    

  (0101,1010) 2  =( ?)10                15,724=( ? ) 2