Skip to the tool
Binary Translator Free tools

Bits and bytes

There are 8 bits in a byte. This guide explains what a bit and a byte are, how much each can hold, and how kilobytes, megabytes and their binary cousins compare.

Updated · Written and checked by Murugan Vellaichamy

How many bits in a byte?

8. One byte is 8 bits. The US National Institute of Standards and Technology (NIST) writes it as 1 B = 23 bit = 8 bit. Half a byte, 4 bits, is often called a nibble, and it is exactly one hex digit.

What is a bit?

A bit, short for binary digit, is the smallest piece of data a computer stores: a single 0 or 1. On its own a bit can answer one yes-or-no question. Put bits together and the number of possible patterns doubles with every bit you add.

BitsDifferent patternsWhole numbers it can hold
1 bit20 to 1
2 bits40 to 3
4 bits160 to 15
8 bits2560 to 255
16 bits65,5360 to 65,535
32 bits4,294,967,2960 to 4,294,967,295

What is a byte?

A byte is a group of 8 bits. It has 28 = 256 patterns, so it holds a number from 0 to 255. That is enough for one ASCII character: the letter “A” is the byte 01000001, which is 65.

Most data is measured in bytes. Text in UTF-8 uses one byte for each basic English letter and two to four bytes for other characters, which is why “é” takes two bytes and most emoji take four. The text to binary converter shows the bytes of anything you type.

Numbers bigger than 255 need several bytes, and computers disagree about which byte comes first. That is called endianness.

Worked example: the letter “A”
128
64
32
16
8
4
2
1
0
1
0
0
0
0
0
1

64 + 1 = 65 = A

Bit or byte? b and B

The symbol for byte is a capital B; bits are written out as “bit”, and you will often see a small b. Internet speeds are usually given in bits per second (Mbit/s or Mbps), while file sizes are given in bytes. To turn a speed in bits into bytes, divide by 8: a 100 Mbit/s connection moves at most 12.5 megabytes each second.

Kilobyte or kibibyte: 1,000 or 1,024?

The metric prefixes kilo, mega and giga mean powers of 10: a kilobyte is 1,000 bytes. Because 210 = 1,024 is close to 1,000, “kilobyte” was long also used to mean 1,024 bytes. To end the confusion, the International Electrotechnical Commission (IEC) approved separate binary prefixes in December 1998: kibi, mebi, gibi and so on, written KiB, MiB and GiB.

Decimal (SI)SizeBinary (IEC)Size
1 kilobyte (kB) = 1031,000 bytes1 kibibyte (KiB) = 2101,024 bytes
1 megabyte (MB) = 1061,000,000 bytes1 mebibyte (MiB) = 2201,048,576 bytes
1 gigabyte (GB) = 1091,000,000,000 bytes1 gibibyte (GiB) = 2301,073,741,824 bytes
1 terabyte (TB) = 10121,000,000,000,000 bytes1 tebibyte (TiB) = 2401,099,511,627,776 bytes

The gap grows with size: a gibibyte is about 7% bigger than a gigabyte. This is why a drive sold as 1 TB (1012 bytes) can show up as about 931 GiB in software that counts in binary units.

Sources and method

Questions

How many bits are in a kilobyte?

8,000 bits in a kilobyte of 1,000 bytes, or 8,192 bits in a kibibyte of 1,024 bytes.

How many bytes is one character?

One byte for each ASCII character, such as English letters, digits and common punctuation. In UTF-8 other characters take two to four bytes.

What is bigger, a bit or a byte?

A byte. It is 8 bits.

What is a nibble?

Four bits, or half a byte. One nibble is exactly one hexadecimal digit, 0 to F.

More converters

Copied