The binary value for 255 is 11111111, with all of the memory locations used up. How can greater numbers, for example, 481 be denoted? Will they be written singularly, like (considering the above example), 00110100 00111000 00110001?

  • 2
    Your title doesn't match your question well.. binary exists independently of computers and is not in itself, limited by memory locations of 8 bits. You're really asking how are numbers > 255 stored on computers. Also your question is not easy to read.. as somebody would have to take out a calculator to see what you are asking/getting at when you give that long binary string. That is totally unnecessary. – barlop Jan 29 '18 at 4:13
  • If they exceed 255, 2 bytes are used instead of 1. Just like using 2 digits when writing 10 instead of 9. – Overmind Jan 29 '18 at 6:55

You just keep going... 2^8, 2^9, etc. split into 8 bit words. 481 would be ‭00000001 11100001‬ in binary... or 2 bytes worth of information. You have 256+128+64+32+1 in your example.

| improve this answer | |

It depends on the number of bits you use. In your example, you've used an 8 bit (one byte) number, which does max out at 255.

Ever since forever, computers have used numbers that are larger than one byte.

For example, in Fortran (invented in 1977) 'real' numbers use 4 bytes, and can store numbers up to 11111111 11111111 11111111 11111111 = 2,147,483,647

For when that isn't enough, Fortran includes the 'double precision' numbers which use 8 bytes.

| improve this answer | |
  • 1
    I learned Fortran IV back in 1967, so your 1977 date is wrong. 'Real' numbers are floating point, but the example you cite is an integer. Also there have been computers that were limited to just single-byte values (for demo or proof-of-concept purposes) (i.e. silicon wasn't always as low-cost as it is today). – sawdust Jan 29 '18 at 7:00
  • Agreed. I was simplifying things a little given the question. I'll admit I wasn't around to remember Fortran in the 60s and keep seeing references to '77 as 'the old version'. – Sir Adelaide Jan 30 '18 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.