recategorized by
3,647 views
21 votes
21 votes
Consider $n$-bit (including sign bit) $2's$ complement representation of integer numbers. The range of integer values, $N$, that can be represented is ______ $\leq N \leq $______ .
recategorized by

2 Answers

Best answer
29 votes
29 votes

$-2^{n-1} \leq N \leq 2^{n-1} -1$

Example : Let us have $3$ bit binary numbers (unsigned )

$000\; (0_{10})$ to $111(7_{10})$  total of $8 (2^3)$  numbers.

But when we have one sign bit then we have half the number of negatives $-4$ to $-1,$ $0$ and $1$ to $3.$

  bit pattern:    100   101  110  111  000  001  010  011

  1's comp:       -3     -2   -1    0   0    1    2    3

  2's comp.:      -4     -3   -2   -1   0    1    2    3
edited by

Related questions

33 votes
33 votes
5 answers
1
Kathleen asked Oct 4, 2014
8,818 views
The regular expression for the language recognized by the finite state automaton of figure is ________
19 votes
19 votes
3 answers
2
Kathleen asked Oct 4, 2014
8,023 views
The number of edges in a regular graph of degree $d$ and $n$ vertices is ____________
31 votes
31 votes
4 answers
3
Kathleen asked Oct 4, 2014
5,633 views
The number of subsets $\left\{ 1,2, \dots, n\right\}$ with odd cardinality is ___________
19 votes
19 votes
1 answer
4
Kathleen asked Oct 4, 2014
6,324 views
The number of flip-flops required to construct a binary modulo $N$ counter is __________