How many bits will it take to represent the decimal number 3789123?
futher question is I got a character string in binary need to change to ASCII , if the code is 1111 0011? the ASCII will wrong ….
add the 0 in left hand side or right hand side?
Favorite Answer
You probably don’t have a log base 2 key on your calculator, so you can use the change of base formula – take the log base anything of 3789123 and divide by the log (same base) of 2.
In this case,
log(3789123)/log(2) = 21.85, so it’ll take 22 bits.
As a quick check:
2^21 = 2097152, which is less than your value
2^22 = 4194304, which is more.
For your second question, you’ll get an extended ASCII character on any vanilla Windows machine. Extended ASCII are the characters IBM inserted into the second 128 back in the early 80’s. Among them are the ASCII graphics characters that MSDOS used to use to draw boxes and the like. You’ll find an extended ASCII table at
http://www.jimprice.com/ascii-128-255.gif
What you’re looking at is the number 243, which is “≤”.
If you really want to know how it’ll be read by a machine that ignores the high-order bit, then strip off the leading 1 and replace it with a 0. That’ll give you the number 115, “s”.
- Academic Writing
- Accounting
- Anthropology
- Article
- Blog
- Business
- Career
- Case Study
- Critical Thinking
- Culture
- Dissertation
- Education
- Education Questions
- Essay Tips
- Essay Writing
- Finance
- Free Essay Samples
- Free Essay Templates
- Free Essay Topics
- Health
- History
- Human Resources
- Law
- Literature
- Management
- Marketing
- Nursing
- other
- Politics
- Problem Solving
- Psychology
- Report
- Research Paper
- Review Writing
- Social Issues
- Speech Writing
- Term Paper
- Thesis Writing
- Writing Styles