Created
January 17, 2021 18:07
-
-
Save sakshi-git08/ce096c11ecb261783041b730fb3c81f5 to your computer and use it in GitHub Desktop.
Knowledge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment