Computers give a certain amount of space for each number. Sort of how if you only had a limited amount of space on a note card, you might limit 2 digits for a number. With this note card, you could write any number from 00 to 99 with that rule, but if you wanted to write a bigger number you’d need to change your rules to allow more digits, which is how we get 100 to 999 for example.
Computers use ‘bits’ to physically store numbers instead of space on a note card. A bit is something that can be on, or off. 1, or 0. This is combined with computers using binary, which has 1 as the highest number in a digit instead of 9. Now the computer scientists needed a rule to say how much size each number was allowed to use on the disc, and they decided 8 bits was a good starting point that they named a byte. That means that the largest number that can be stored in a byte is 11111111, which is 255 in base 10. If they want to store a larger number, they tell the computer that the rules are different with this number and use more bits/bytes to store it. This is where “64 bit computers” get their name.
It’s not the maximum number used in computers.
What it is is this:
11111111
Computers don’t understand anything but “off” or “on”. “Off” is a “0” and “on” is a “1”.
The way that counting works is that as soon as you have more numbers than fit in the number of digits you’re using, you add a new digit. We’re used to a number system based on 10(the digits 0-9), so when you get past the number “9”, one more than that (which is 10) can’t fit in the number of digits you have, so you have to add another digit.
When you’re talking about how computers count, basically, you count 0, 1, and then two can’t fit, so that goes into the next space. It’s called “binary” or base 2, because every number to the left is worth twice as much as the number to its right.
So in binary, the numbering system computers use, here’s how numbers count:
0 is 00000000
1 is 00000001
2 is 00000010
3 is 00000011
4 is 00000100
5 is 00000101
6 is 00000110
7 is 00000111
8 is 00001000
9 is 00001001
10 is 00001010
11 is 00001011
12 is 00001100
13 is 00001101
14 is 00001110
15 is 00001111
16 is 00010000
and so on.
254 is 11111110
255 is 11111111
255 is a common number you see because it’s the highest number that can be represented in these eight characters in binary. But it’s by no means the highest number that computers can use.
It is not the max number in computers. It is the maximum number in one specific case 8 bit unsigned integer.
If you have 8 bits there is 2^8 = 265 combination and if you start at 0 the highest number you can get is 255. So 8 bit signed integer is 0 to 255. If you have a 8 bit signed integer you ger -128 to 127
One byte is today defined as 8 bits and that is the max number you can store in one byte but you can use multiples. The 1 byte = 8 bit become the common standard because you could get 1 character with a reasonable character set if you use 8 bits. You can fit most if not all letters used in different Latin scripts in 8 bits.
Use 2 and you get 16 bit with a max of 2^16 -1 =65535. Use 4 byrs =32 bits and we get 2^32 -1 = 4 294 967 295 use 8 bytes = 64 bits and you get 18 446 744 073 709 551 615
This is just for integers there is floating point numbers where you can have a lot larger numbers but with lower precision.
Most computers today have inductions that can do calculations of 64 bits integers, the can for certain do that with 32 bit numbers. This is excluding special instruction that can handle larger numbers or using multiple instruction.
A byte is 8 bits. A bit is a switch with two positions, on and off. Each switch doubles the number of ways you could set up the switches in the byte, so 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 256 different combinations.
The way we like to number those combinations isn’t 1-256 though, it’s 0-255. 0 is just more useful than 256.
You know how we can count up to 9 before we need two numerals for 10? But 10 is really a 1 and a 0?
There are 9 numerals there, but 0 is also pretty useful, and if we want to use zero we need to use ten different numerals.
Computers often store information as numbers, and the way they store those numbers is limited to 256 different values. Because we want to use zero, we take away 256 on the top and add 0 on the bottom, so that between 0 and 255 the computer has 256 values to use.
It’s 256 because of binary counting, which only uses two numbers, 1 and 0 instead of the ten we normally use for 0 up to 9.
Latest Answers