Bytes and bytes:
How computers (and Java) represent numbers

For many simple programs, it's not too important to know exactly how computers represent numbers. It's often enough to know things in basic terms, such as:

When do you need to know about how computers represent numbers...?

Sometimes it's useful to have a more precise idea of just how numbers are represented by the computer "under the hood". This can be important in cases such as:

On the next page, we look at binary representation used by computers to store and manipulate numbers. If you're already familiar with binary notation in principle (e.g. because you've studied mathematics), you may prefer to skip straight on to look at how binary digits are grouped into units in computing, starting with bits and bytes.

Written by Neil Coffey. Copyright © Javamex UK 2008. All rights reserved.