Storing -ve nos

if we have to store -8 in 4 bist, how will we store?
in this video, i could not get as for 8, it is taking as 1000, which i think is wrong as in 4 bits,1 bit is for sign.

Also tell in case of 4 bits, range is from -8 to 7…i understood 7, but why -8?

hello @sp_wizard

yeah for 4 bit signed number we cannot store 8 in it.

becuase computer store negative numbers in 2’s compliment form , which has only one 0.
range of n bit signed number-> - 2^(n-1) …2^(n-1)-1
ss

yeah for 4 bit signed number we cannot store 8 in it…but in a 4 bit signed number,1 bit is for sign, so how can we store 8?

we cannot( we will need more than 4 bit to store it) , if u try then u will get negative output becuase of range overflow.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.