NegativeAndFloatingPoint 31KB Jan 14 2015 07:24:39 AM

advertisement
Two's complement writing:
Write the 4-bit 2's complement notation for values -8 to 7:
-8
7
6
5
4
3
2
1
-7
-6
-5
-4
-3
-2
-1
0
Write 100 in 8 bit 2's complement. It will be a normal binary number, with 0 in the leftmost bit (since it
is positive):
64
32
16
8
4
2
1
Write -100 in 8 bit 2's complement:
Add your two binary values (you better get 0!):
Perform the following two's complement additions – ignore any extra carry out of the 4 digits. Identify
which operations result in errors.
0010
1100
1010
1011
0111
0011
1101
1111
Floating Point Practice:
Decode the following 8-bit binary floating point numbers - what decimal values do they represent?
00110110 = ____________________
11011000 = ____________________
01001110 = ____________________
Use table below and excess chart to the right to help
Sign
Exponent
0.5
Mantissa
0.25 0.125
0.0625
Use the floating point applet from Chapter 5.8 of the CS160Reader to do the next questions:
Find two representations of -1.5: _______________ _______________
Preferred one should have a 1 in largest digit of the mantissa
What binary value is the closest you can get to 0.4? (you should be able to get within .007)
What is the closest you can get to 5.2?
Download