Monday, 15 October 2007

Binary worksheets.

Examples:

2's Complement: If first digit is "1", the number it represents is negative.

E.G: [4 2 1]
2's = 1 0 1 This means that the first digit in the binary represents -4.

This equation will be (-4) + 1 = -3

Mantissa and exponent:

A one-byte floating point numbering system uses 5 places for the mantissa and 3 for the exponent. Convert the number 01100011 into decimal by filling in the following table :

Step 1 : I know this because the left most bit is 0
Step 2 : Mantissa : 0.1100
Step 3 : It starts out with a 0
Step 4 : 011 = 3 in Denary
Step 5 : The deimal place must be moved 3 places to the right
Step 6 : Mantissa : 0110.0
Step 7 : New Mantissa :110
Step 8 : Final Number : 6

Normalising:
A two-byte floating-point numbering system uses 10 places for the mantissa and 6 for the exponent. Convert the number -8.5 into a normalised floating-point number by filling in the following table:

Step 1 : 8.5 in binary is : 1000.1
Step 2 : Mantissa : 000001000.1
Step 3 : 2s complement : 111110111.1
Step 4 : Normalised form : 1.011110000
Step 5 : Needs to be moved 4 places to the left.
Step 6 : The exponent is therefore 111100 = -4
Step 7 : The final answer is : 1011 1100 0011 1100

No comments: