The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+13 votes
541 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.5k points)
edited by | 541 views

1 Answer

+19 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.1k points)
selected by


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

39,512 questions
46,664 answers
139,705 comments
57,481 users