Skip to content

Instantly share code, notes, and snippets.

View sakshi-git08's full-sized avatar
🎯
Focusing

Sakshi Aggarwal sakshi-git08

🎯
Focusing
  • Faridabad, Haryana
View GitHub Profile
@sakshi-git08
sakshi-git08 / Knowledge
Created January 17, 2021 18:07
Knowledge
1 bit can take 0 or 1
1 Byte = 8 Bits
The first bit is used as a sign ( - or + )
then remaining bits are 7
so we can write 2^7 = 128 different numbers for one sign
we get 0 as a positive sign. then we have 128 numbers for the negative side,127 numbers for the positive side and 0 (zero)
so the range is -128 to 127 including 0
-2(bits-1) and for the maximum range, it is 2(bits-1)-1