1 1 vote If integer needs 2 bytes of storage, then maximum value of signed integer is? Programming in C programming-in-c + – Vivek Jain 874 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes For signed int 16 bit, I think the maximum value should be (215 - 1) whereas for unsigned it should be (216 - 1) RahulVerma answered Sep 19, 2016 RahulVerma comment Share Follow See all 2 Comments 2 2 Comments reply Vivek Jain commented Sep 19, 2016 reply Follow flag But why not it is 215 only?? Why this -1? 0 0 replyShare RahulVerma commented Sep 19, 2016 reply Follow flag In the 16 bit the MSB is used to code the sign (1 means negative and 0 means positive), so only 15 bits are available for the actual value. In this range one value includes bits with all zeros which is removed and hence you get the '-1' 0 0 replyShare Please log in or register to add a comment.