Byte

The **byte** (symbol: **B** or **o**, also known as the **octet**) is a unit of measurement of the size of information on a computer or other electronic device. A single byte is eight bits. Some early computers used six bits for each byte. The bit is the smallest unit of storage on a computer, a single on/off value.

A single typed ASCII character (for example, 'x' or '8') is stored in one byte. The character is held as a binary number which encodes a text character. To map each number to a character, an agreed code such as EBCDIC or ASCII is needed.  EBCDIC is a character encoding used mainly on mainframe computers. It uses 8 bits per byte. ASCII is another encoding that only uses seven bits. _Extended ASCII_ uses 8 bits to give more types of characters, mostly used on personal computers.

The byte is the smallest useful unit of measure to show how many characters a computer (or electronics device) can hold.  This is useful for things like RAM, or storage devices like USB drives and other types of Flash memory. Sending of data (for a modem or wi-fi) is usually measured in bits, not bytes.

On modern computers, one byte is equal to eight bits. Some early computers used fewer bits for each byte. To tell them apart, computer scientists called an 8 bit byte an octet. In modern usage, an octet and a byte are the same.

## Symbol

The symbol for the byte is B. Sometimes a lowercase "b" is used, but this use is incorrect because "b" is actually the IEEE symbol for the bit. The IEC symbol for bit is bit.  For example, "MB" means "megabyte" and "Mbit" means "megabit". The difference is important because 1 megabyte (MB) is 1,000,000 bytes, and 1 megabit (Mbit) is 1,000,000 bits or 125,000 bytes. It's easy to confuse the two, but bits are much smaller than bytes, so the symbol "b" should be used when referring to "bits" and an uppercase "B" when referring to "bytes".

## Names for larger units

For large data, byte is often used with a binary prefix:
- Kilobyte (kB) (10<sup>3</sup>)/kibibyte (KB) (2<sup>10</sup>)
- Megabyte (MB) (10<sup>6</sup>)/mebibyte (MiB) (2<sup>20</sup>)
- Gigabyte (GB) (10<sup>9</sup>)/gibibyte (GiB) (2<sup>30</sup>)
- Terabyte (TB) (10<sup>12</sup>)/tebibyte (TiB) (2<sup>40</sup>)
- Petabyte (PB) (10<sup>15</sup>)/pebibyte (PiB) (2<sup>50</sup>)

The following terms represent even larger units of bytes, but are very rarely used:
- Exabyte (EB) (10<sup>18</sup>)/exbibyte (EiB) (2<sup>60</sup>)
- Zettabyte (ZB) (10<sup>21</sup>)/Zebibyte (ZiB) (2<sup>70</sup>)
- Yottabyte (YB) (10<sup>24</sup>)/Yobibyte (YiB) (2<sup>80</sup>)
- Ronnabyte (RB) (10<sup>27</sup>)/Robibyte (RiB) (2<sup>90</sup>)
- Quettabyte (QB) (10<sup>30</sup>)/Quebibyte (QiB) (2<sup>100</sup>)

## Byte Chart

According to the International Electrotechnical Commission (IEC), who sets many computer standards, these charts show how bytes should be referred to.

People who refer to 1 kilobyte as 1,024 bytes, for example, are technically incorrect; 1,024 bytes should be referred to as 1 kibibyte, according to the IEC.  However, using 1024 for kilo and 1048576 for mega, etc. was widely practiced before the IEC standards were set in 1998. There is some confusion and mixing of terms in the marketplace. Computer memory is still referred to in powers of 2, so 1KB of memory is 1024 bytes, whereas in computer data storage powers of 10 are used, so 1KB is 1000 bytes.

### "kilo-" = 1,000

When using standard metric names like "kilo-", "mega-" and "giga-", they should follow the same measure that other metric measurements use, like kilometer (1 kilometer = 1,000 meters), or gigahertz (1 gigahertz = 1,000,000,000 hertz) for example.
|Unit|Number|Short scale|Long scale|Scientific,E Notation/ Power of 10|
| --- | --- | --- | --- | --- |
|Byte (B)|1|1 byte|1 byte|1*10<sup>0</sup>,1E0 / 10<sup>0</sup>|
|Kilobyte (KB)|1,000|1 thousand bytes|1 thousand bytes|1*10<sup>3</sup>,1E3 / 10<sup>3</sup>|
|Megabyte (MB)|1,000,000|1 million bytes|1 million bytes|1*10<sup>6</sup>,1E6 / 10<sup>6</sup>|
|Gigabyte (GB)|1,000,000,000|1 billion bytes|1 billion bytes|1*10<sup>9</sup>,1E9 / 10<sup>9</sup>|
|Terabyte (TB)|1,000,000,000,000|1 trillion bytes|1 trillion bytes|1*10<sup>12</sup>,1E12 / 10<sup>12</sup>|
|Petabyte (PB)|1,000,000,000,000,000|1 quadrillion bytes|1 quadrillion bytes|1*10<sup>15</sup>,1E15 / 10<sup>15</sup>|
|Exabyte (EB)|1,000,000,000,000,000,000|1 quintillion bytes|1 quintillion bytes|1*10<sup>18</sup>,1E18 / 10<sup>18</sup>|
|Zettabyte (ZB)|1,000,000,000,000,000,000,000|1 sextillion bytes|1 sextillion bytes|1*10<sup>21</sup>,1E21 / 10<sup>21</sup>|
|Yottabyte (YB)|1,000,000,000,000,000,000,000,000|1 septillion bytes|1 septillion bytes|1*10<sup>24</sup>,1E24 / 10<sup>24</sup>|
|Ronnabyte (RB)|1,000,000,000,000,000,000,000,000,000|1 octillion bytes|1 octillion bytes|1*10<sup>27</sup>,1E27 / 10<sup>27</sup>|
|Quettabyte (QB)|1,000,000,000,000,000,000,000,000,000,000|1 nonillion bytes|1 nonillion bytes|1*10<sup>30</sup>,1E30 / 10<sup>30</sup>|

### "kibi-" = 1,024

Since computers are very complex digital devices that are based on the binary numeral system rather than the commonly-used decimal numeral system or binary coded decimal system, there are many situations where the standard metric system does not work well, particularly with memory sizes for a computer or storage device.  If a memory or storage device uses a binary number for addresses, the number of different positions to be accessed (the size of the memory) can be expressed as a power of 2, rather than a power of 10.

|Unit|Number|Maths|
| --- | --- | --- |
|Byte (B)|1|2<sup>0</sup> bytes|
|Kibibyte (KiB)|1,024|2<sup>10</sup> bytes|
|Mebibyte (MiB)|1,048,576|2<sup>20</sup> bytes|
|Gibibyte (GiB)|1,073,741,824|2<sup>30</sup> bytes|
|Tebibyte (TiB)|1,099,511,627,776|2<sup>40</sup> bytes|
|Pebibyte (PiB)|1,125,899,906,842,624|2<sup>50</sup> bytes|
|Exbibyte (EiB)|1,152,921,504,606,846,976|2<sup>60</sup> bytes|
|Zebibyte (ZiB)|1,180,591,620,717,411,303,424|2<sup>70</sup> bytes|
|Yobibyte (YiB)|1,208,925,819,614,629,174,706,176|2<sup>80</sup> bytes|
|Robibyte (RiB)|1,237,940,039,285,380,274,899,124,224|2<sup>90</sup> bytes|
|Quebibyte (QiB)|1,267,650,600,228,229,401,496,703,205,376|2<sup>100</sup> bytes|