CSCE211,
Homework Assignment #2
Instructions
- Show all your steps--answers
alone are not sufficient.
- Homework must be done neatly.
- Use straight-edged paper (no
notebook tear-outs with ragged edges).
- Please STAPLE papers to a
signed cover sheet.
Homework Problems
X =
0 1 1 0 1 0 1 1
Y =
0 0 1 0 1 0 1 0
- Calculate (a) X+Y given above an 8-bit, two's
complement number system. Show all your
2's complement conversion steps. Check your results in decimal
arithmetic. Identify any
overflow conditions that occur and tell how you detected them. (40 pts)
- Calculate X─Y given above using an 8-bit, two's
complement number system. Remember
that X─Y is computed as = X+ (“─”Y), where
“─” Y” is the (2's complement of Y). Show all your 2's complement conversion
steps. Check your results in decimal arithmetic. Identify any overflow conditions that
occur and tell how you detected
them. (40
pts)
3.
Express the decimal number 1950 in the BCD code. (10 pts)
4.
Express the string Cat in the ASCII code. (10 pts)