### Computer Systems Organization I - Prof. Grishman

### Assignment #1

Answer the following questions from Chapter 2 of Patt and Patel:

#10 and 11 (binary/decimal conversion)

#44 (binary to ASCII conversion)

#45 and 46 (binary/hex conversion)

#37 and 38 (overflow detection)

For #37 and #38, you are to write a Boolean (logical) expression (one
involving
just AND, OR, and NOT) whose value is a "1" in case of overflow and "0"
otherwise, when adding together two 4-bit numbers m and n. (The book asks for a 4-bit
output, with 3 bits being 0, but you can ignore that and just produce
the single overflow bit.) In writing your Boolean expression, you
should refer to the bits of the numbers with the subscripts 0
[low-order bit], 1, 2, and 3 [high-order bit], so the numbers being
added are m_{3} m_{2} m_{1} m_{0}
and n_{3} n_{2} n_{1} n_{0}. You may
also refer to bits of the sum, s_{3} s_{2} s_{1}
s_{0}, and the carries out of the corresponding bits, c_{3}
c_{2} c_{1} c_{0}. In #37 you answer this
for two's complement numbers; in #38 you answer this for unsigned
numbers.

Submit your answer in hard copy on a single sheet of paper, in class on
Thursday, September 15th.
If you are unable to come to class on that day, send the answer in
email to grishman@cs.nyu.edu.