In computer memory terms, the definition of a byte is a collection of eight bits. Unlike a bit that can hold the value of zero or one, a byte of memory can hold a value from 0-255.

Think of the below number as eight individual bits making up a byte, all turned off. The value is 0.

00000000

If we turn on the right-most bit in the byte, the 0th bit (computer scientists love to count starting from the number 0), the value is now one.

00000001

What if we want to add 1 to the value? Remember that a bit can only hold values of 0 or 1. So how is the number 2 represented? We turn on the bit to the left, the 1st bit, like so:

00000010

If the first bit is a 1 and the 0th bit is 0, the total value of all bits is 2. Now what if we want to add 1 to create a byte value of 3? Turn that 1st bit on again.

00000011

What happens if we want to create a value of 4? Remember how the 1st bit represented the number 2? The 2nd bit represents the number 4. Turn it on and turn the other two bits off.

00000100

And so forth. Here is a table:

Bit 7 – Value of 128

Bit 6 – Value of 64

Bit 5 – Value of 32

Bit 4 – Value of 16

Bit 3 – Value of 8

Bit 2 – Value of 4

Bit 1 – Value of 2

Bit 0 – Value of 1

An aside – If you know what exponentiation means, think of each bit taking on the value of two to the power of the bit number. 2 to the power of 0 is 1, 2 to the power of 1 is 2, etc.

So to get a byte value of 255, let’s turn all of the bits on.

11111111

Several bytes can be strung together to form kilobytes, megabytes, gigabytes, and terabytes.