suckycode Posted September 12, 2011 Posted September 12, 2011 I do know how to convert normal/whole numbers, but i can't do this - Question1) Convert the decimal number 7.52 to binary (8-bits after the binary point, not rounded) ? Question 2) The reverse for the above question - Convert Binary Number 109.0011 to decimal exactly ? Would appreciate if someone can give a explanation to do this without using a calculator, as i want to learn how it is done with pencil and paper. Thank you in Advance.
TonyMcC Posted September 12, 2011 Posted September 12, 2011 In decimal notation the numbers following the point are in tenths, hundredths, thousandths, etc. In binary they are halves, quarters, eighths, etc. . In case this is homework, say what this method gives you for your answers.
suckycode Posted September 13, 2011 Author Posted September 13, 2011 Ahh this makes more sense. I have another one, if you could explain me in a similar way - I know the answers to these ones, but i am not sure how .... In base 10, what is the largest 11-bit unsigned binary value? 2047 In base 10, what is the most positive 8-bit two’s complement value? 127 In base 10, what is the most negative 9-bit two’s complement value? -256 This isn't homework, but the solution to it, i just want to know how they are done.
TonyMcC Posted September 13, 2011 Posted September 13, 2011 Ahh this makes more sense. I have another one, if you could explain me in a similar way - I know the answers to these ones, but i am not sure how .... In base 10, what is the largest 11-bit unsigned binary value? 2047 In base 10, what is the most positive 8-bit two’s complement value? 127 In base 10, what is the most negative 9-bit two’s complement value? -256 This isn't homework, but the solution to it, i just want to know how they are done. I'm a bit rusty on this kind of thing and will need to brush up two's complement. However your first question is straightforward. Your largest unsigned binary number is 11111111111 This, in decimal, is 1+2+4+8+16+32+64+128+256+512+1024=2047
TonyMcC Posted September 14, 2011 Posted September 14, 2011 (edited) I'm a bit rusty on this kind of thing and will need to brush up two's complement. However your first question is straightforward. Your largest unsigned binary number is 11111111111 This, in decimal, is 1+2+4+8+16+32+64+128+256+512+1024=2047 For the second part it is important to note that most significant digit is 0. Thus your largest positive number is 01111111 in binary. In decimal (counting right to left as usual) you have 1+2+4+8+16+32+64=127 For 3rd part I can't really explain better than my attachment which is cribbed from the link :- http://en.wikipedia.org/wiki/Two's_complement Edited September 14, 2011 by TonyMcC
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now