The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+13 votes
634 views
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 $_____ .
asked in Digital Logic by Veteran (59.8k points)
edited by | 634 views

1 Answer

+21 votes
Best answer

-2n-1 <= N <= 2n-1 -1

 Example : let we have 3 bit binary no (unsigned )

000 (0) to 111(7)  total of 8 (23)  no.

but when we have one signed bit then we have half of negative -4 to -1 and 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
answered by Veteran (55.8k points)
selected by

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

46,766 questions
51,219 answers
176,462 comments
66,579 users