Homework Assignment #1 – Number Representations
The purpose of this assignment is to let you be familiar and become comfortable with binary
representations which are used heavily in computer organization.
Problem 1 (30 points, 10 points each)
Convert the following decimal numbers into (a) 8
bit, (b) 16bit, and (c) 32bit binary numbers. For negative numbers, use the 2’s
complement. State “overflow” if a number cannot be represented correctly. Hint: You may
want to use the sign extension rule.
1)
73
ten
.
2)
89
ten
.
3)
4,000
ten
.
Solution:
Decimal
number
8bit two’s
complement
binary number
16bit two’s complement binary
number
32bit two’s complement
binary number
73
0100 1001
0000 0000 0100 1001
0000 0000 0000 0000
0000 0000 0100 1001
89
1010 0111
1111 1111 1010 0111
1111 1111 1111 1111
1111 1111 1010 0111
4,000
Overflow
1111 0000 0110 0000
1111 1111 1111 1111
1111 0000 0110 0000
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 Liu
 Binary numeral system, Decimal, double precision, 8 bits, 4,000 8bit

Click to edit the document details