If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Bytes

A bit is the smallest piece of information in a computer, a single value storing either 0 or 1.
A byte is a unit of digital information that consists of 8 of those bits.
Here's a single byte of information:
11110110
Here are three more bytes of information:
000010100101010011011011

From bits to bytes

Conversion between bits and bytes is a simple calculation: divide by 8 to convert from bits to bytes or multiply by 8 to convert from bytes to bits. Try it yourself!
Check your understanding
How many bytes long is this binary sequence?
1011100111011011011010010011010101111111
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

Check your understanding
How many bits are in 8 bytes of information?
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

Why bytes?

What is so special about 8 bits that it deserves its own name?
Computers do process all data as bits, but they prefer to process bits in byte-sized groupings. Or to put it another way: a byte is how much a computer likes to "bite" at once.
A computer with a thought bubble with three bytes inside
The byte is also the smallest addressable unit of memory in most modern computers. A computer with byte-addressable memory can not store an individual piece of data that is smaller than a byte.
Memory
AddressData
111110000
200001010
300100110
411000001

What's in a byte?

A byte represents different types of information depending on the context. It might represent a number, a letter, or a program instruction. It might even represent part of an audio recording or a pixel in an image.
We'll explore how computers can use bits and bytes to represent all types of information in this unit.

🙋🏽🙋🏻‍♀️🙋🏿‍♂️Do you have any questions about this topic? We'd love to answer— just ask in the questions area below!