1
$\begingroup$

I'm a bit stuck on this question (not sure if it comes under math but if it doesn't please help me find which topic to put it in) :

If you want an n bit number to have a max value of x (positive) and min value of -(x-1) which is negative, what would the bias be? Note -- the bias is negative, meaning for example, if a number was 0000 and the bias was 8, then the number would end up being 0000-8 = -8.

Here's what I'm thinking so far -- for an n-bit number representation, the range is $[-2^{n-1}, 2^{n-1}-1]$.

Since this is biased, we want: $2^{n-1}-1-bias = x$ and $-2^{n-1}-bias = -(x-1)$

but when I try to solve for bias I get that bias is 1, because almost everything cancels out. but it isn't the right answer. Would love some advice and suggestions

$\endgroup$
1
  • $\begingroup$ I'll have a look at this one too, Melanie. I've only semi-understood your question, though, primarily because I have not understood what the "bias" is. If you can give me a reference, like a video or a book or a paper which explains it, I can look it up and get back to you on this one. $\endgroup$ Jan 28, 2021 at 9:06

0

You must log in to answer this question.

Browse other questions tagged .