Why is the number range 0-255 common in many computer files?

1.21K views

Why is the number range 0-255 common in many computer files?

In: Technology

6 Answers

Anonymous 0 Comments

Normal numbers that we use every day is Base 10. That is, there are ten numbers. 0,1,2,3,4,5,6,7,8,9.

When you run out of numbers (i.e. you get to 9) you add a 1 to the left, and carry on. 10,11, 12…

When you run out of numbers again, you change the first number to a 2.

Binary (Base 2) works exactly the same way, but you only have two numbers, 0 and 1.

So you can count to 1 before you run out of numbers. Then you have to add one to the left. It works the same as that all the way along.

0 = 0

1 = 1

10 = 2

11 = 3

100 = 4

101 = 5

110 = 6

111 = 7

and so on.

A single binary digit is called (a contraction of **b**inary dig**it** really) a ‘bit’. A lot of computers for a lot of the history of personal computing use 8 bits to store a character. Using the system of binary counting above, the highest number you can store in eight bits is 255.

00000000 = 0

11111111 = 255

That’s why it comes up a lot.

You are viewing 1 out of 6 answers, click here to view all answers.