



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Homework Assignment #1 – Number Representations
Problem 1 (30 points, 10 points each) Convert the following decimal numbers into (a) 8-bit, (b) 16-bit, and (c) 32-bit 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.
2
n 12 0000 0000 0000 0000 0000 000 0010 0000
0
Sign bit o Exponent
mantissa (^1011 0000 0000 0000 0000 000 23) bit
(^2) 1.375 (^) 1,0 12
0.5 (^2) I
sign
Montiss 01100000000000000000000
n x2 bit
0.6 1.2 I
0.8 (^1 6 ) 0.6 1.2^1 bit (^1) repeating 0 0100110011 2 sign bit O Exponent (^2 1275 12510 ) mantissa (^0011001100 23) bits 0 01111101 0011001100 23 bits