0 votes 0 votes I think it is $8$ bits including sign bit. But given answer is $7$ bits. Am I wrong? Digital Logic digital-logic + – Aghori asked Nov 13, 2017 Aghori 2.4k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply just_bhavana commented Nov 13, 2017 reply Follow Share 2's complement range for n-bits numbers is -2n-1 to +2n-1 - 1 So, -64 = -2n-1 $\Rightarrow n - 1 = 6$ n = 7 is correct 0 votes 0 votes Aghori commented Nov 13, 2017 reply Follow Share It was known @just_bhavna but is sign bit included in $7$ bits? I think no. 0 votes 0 votes Ram Swaroop commented Jan 4, 2020 reply Follow Share 7 bits 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes .... Hira Thakur answered Nov 13, 2017 Hira Thakur comment Share Follow See all 2 Comments See all 2 2 Comments reply Aghori commented Nov 13, 2017 reply Follow Share Why not taking sign bit? 0 votes 0 votes sumit goyal 1 commented Nov 13, 2017 reply Follow Share range of numbers for 2's compliment is : - 2^(n-1) to 2^(n-1) -1 -2^(n-1) is the lowest negative number we can represent in 2's compliment (iam saying lowest because in negative sign small number becomes largest and viceversa) now you want to represent -64 let me try to show you on number line -2^(n-1) <----------------- -ve number--------------0---------+ve number----------------> 2^(n-1) -1 now -64 will lie on negative side and -64 will be >= -2^(n-1) = 2^(n-1) >= 64 (multiplying by minus sign , equality sign changes) take log on both sides (n-1) log2 (base2) >= log64(base 2) n-1 > = 6 n =7 bits answer :) 0 votes 0 votes Please log in or register to add a comment.