Interview Question

Interview Herndon, VA

What is the range of numbers that can be stored using a

  single byte?
Answer

Interview Answer

2 Answers

2

Signed: From ?128 to 127. Unsigned: From 0 to 255.

Interview Candidate on Nov 14, 2012
0

I think the range can be anything you want it to be, just have to agree on the storage format. Imagine a situation where you have to store only the even positive numbers, that means the range can be 0..512. If you know that the lowest number can be 100, then the range can be 100..612. Using more elaborate formats you can encode any range in a byte (with low precision, possibly).

NA on Feb 6, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.