Skip to content
ContentLora

    Tip: press / anywhere to search.

    Explainer

    Binary: how computers store data as bits and bytes

    Computers store data as bits, binary digits that are either 0 or 1, grouped into bytes of eight bits that can stand for any whole number from 0 to 255.[1][2] Text is stored by giving each character a number: early networks used 7-bit ASCII, and today UTF-8 encodes characters from most of the world's writing systems in one to four bytes while staying compatible with ASCII.[3][4][5] Physically, DRAM memory chips hold bits as electric charges on capacitors and lose their contents without power, while NAND flash in SSDs keeps data when the power is off.[6][7][8]

    Editor reviewedUpdated Explainer12 claims · 100% primaryComputing

    This page explains how information is represented as binary data. For how the chips that hold it are designed and made, see how memory chips work.

    Bits and bytes

    The basic unit of computer data is the bit, a binary digit whose value is either 0 or 1.[1] Bits are grouped into bytes: NIST defines a byte as a sequence of eight bits, which can also be treated as a whole number from 0 to 255.[2] Eight bits give 256 possible patterns, from 00000000 to 11111111, which is why a single byte can hold any value in that range.[2]

    Some data takes more than one byte per item: a single character of Unicode text, for example, can take one to four bytes.[5]

    Kilobytes, kibibytes and other units

    In December 1998 the International Electrotechnical Commission (IEC) approved separate names for binary multiples, such as kibi (2^10), mebi (2^20) and gibi (2^30).[9] Under these rules a megabyte (MB) is 1,000,000 bytes while a mebibyte (MiB) is 1,048,576 bytes,[9] and a gigabyte (GB) is 1,000,000,000 bytes while a gibibyte (GiB) is 1,073,741,824 bytes.[10]

    How text becomes numbers

    Text is stored by assigning each character a number. An early network standard, RFC 20 from 1969, proposed sending text between ARPANET computers as standard 7-bit ASCII inside an 8-bit byte whose highest bit was always 0.[3]

    The Unicode character set covers most of the world’s writing systems.[4] Its UTF-8 encoding, specified in RFC 3629, preserves the full ASCII range, which keeps it compatible with older software that relies on ASCII.[4] The Unicode Consortium says a character can be stored as one to four 8-bit bytes in UTF-8, one or two 16-bit units in UTF-16, or a single 32-bit unit in UTF-32; UTF-8 is the most common on the web, and conversions between the three are fast and lossless.[5][11]

    Where the bits physically live

    In DRAM, bits are held as electric charges. IBM says its engineer Robert Dennard conceived DRAM in 1966 as a way to hold a bit with a single transistor, storing bits as charges on capacitors that are refreshed repeatedly.[6] Micron describes DRAM as low-latency memory that loses its contents when the power is turned off.[7]

    NAND flash, used in solid-state drives and phones, is non-volatile, rewritable storage with high capacity at low cost.[8] Micron’s NAND range includes triple-level cell (TLC) and quad-level cell (QLC) types, which trade storage density against performance and endurance.[12]

    Developing in AI & Computing

    Questions readers ask

    What is a bit?

    A bit is a binary digit with a value of either 0 or 1.[1]

    How many bits are in a byte?

    Eight. NIST defines a byte as a sequence of eight bits, which can also be read as a whole number from 0 to 255.[2]

    Is a megabyte 1,000,000 or 1,048,576 bytes?

    It depends on the prefix. In 1998 the IEC approved separate names for binary multiples. Under them a megabyte (MB) is 1,000,000 bytes and a mebibyte (MiB) is 1,048,576 bytes; a gigabyte is 1,000,000,000 bytes and a gibibyte 1,073,741,824 bytes.[9][10]

    How does a computer store letters?

    Each character is given a number that is stored as bits. ASCII uses 7 bits per character. UTF-8, the most common encoding on the web, stores Unicode characters in one to four bytes and keeps the ASCII range unchanged.[3][4][5]

    Why does memory forget everything when the power goes off?

    DRAM stores bits as charges on capacitors that must be refreshed repeatedly and loses its contents when power is turned off. NAND flash, used in SSDs, is non-volatile and keeps its data.[6][7][8]

    Sources

    · 12 claims from 6 publishers

    Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.

    1. [1]

      NIST defines a bit as a binary digit, with a value of 0 or 1. confirmedas of 2026-11-14

      • bit (Glossary) · NIST Computer Security Resource Center · Primary source · Definitions (retrieved 2026-11-14)
      • bit (Glossary) · NIST Computer Security Resource Center · Primary source · Definitions (retrieved 2026-11-14)
    2. [2]

      NIST defines a byte as a sequence of eight bits, which can also be read as an integer from 0 to 255. confirmedas of 2026-11-14

      • byte (Glossary) · NIST Computer Security Resource Center · Primary source · Definitions (FIPS 197) (retrieved 2026-11-14)
      • byte (Glossary) · NIST Computer Security Resource Center · Primary source · Definitions (FIPS 204) (retrieved 2026-11-14)
    3. [3]

      RFC 20 (1969) proposed using standard 7-bit ASCII embedded in an 8-bit byte whose high-order bit is always 0 for text sent between computers on the ARPANET. confirmedas of 1969-10-16

    4. [4]

      UTF-8, specified in RFC 3629, encodes the Universal Character Set covering most of the world's writing systems while preserving the full US-ASCII range, keeping it compatible with software that relies on ASCII. confirmedas of 2003-11-01

    5. [5]

      The Unicode Consortium says a Unicode character can be stored as one to four 8-bit bytes (UTF-8), one or two 16-bit code units (UTF-16) or a single 32-bit code unit (UTF-32), and that UTF-8 is most common on the web. confirmedas of 2026-11-14

    6. [6]

      IBM says its engineer Robert Dennard conceived DRAM in 1966 as a way to hold a bit with a single transistor, storing bits as charges on capacitors that are refreshed repeatedly, replacing a memory design that used six transistors per bit. confirmedas of 2026-11-07

    7. [7]

      Micron describes DRAM as low-latency memory that loses its contents when power is turned off, used mostly in data centres, PCs, graphics, industrial, mobile and automotive products. confirmedas of 2026-10-09

    8. [8]

      Micron describes NAND as non-volatile, rewritable storage that offers high capacity at low cost, used in SSDs and, as managed NAND, in smartphones and other mobile devices. confirmedas of 2026-10-09

    9. [9]

      In December 1998 the IEC approved binary prefixes such as kibi (2^10), mebi (2^20) and gibi (2^30), so that one mebibyte (MiB) is 1,048,576 bytes while one megabyte (MB) is 1,000,000 bytes. confirmedas of 2026-11-14

      • Prefixes for binary multiples · NIST Physical Measurement Laboratory · Primary source · Prefixes for binary multiples (retrieved 2026-11-14)
      • Prefixes for binary multiples · NIST Physical Measurement Laboratory · Primary source · Examples and comparisons with SI prefixes (retrieved 2026-11-14)
    10. [10]

      Under the IEC binary prefixes, one gibibyte (GiB) is 1,073,741,824 bytes, while one gigabyte (GB) is 1,000,000,000 bytes. confirmedas of 2026-11-14

      • Prefixes for binary multiples · NIST Physical Measurement Laboratory · Primary source · Examples and comparisons with SI prefixes (retrieved 2026-11-14)
    11. [11]

      The Unicode Consortium says conversions between UTF-8, UTF-16 and UTF-32 are algorithmic, fast and lossless. confirmedas of 2026-11-14

    12. [12]

      Micron's NAND includes triple-level cell (TLC) and quad-level cell (QLC) types, which differ in storage density, performance and endurance. confirmedas of 2026-10-09

    Revision history (1)
    1. Page created.

    Created Nov 14, 2026. Last reviewed by an editor on Nov 14, 2026. Next scheduled review: Nov 14, 2027.

    Cite this page

    "Binary: how computers store data as bits and bytes." ContentLora, updated Nov 14, 2026. https://contentlora.com/explain/how-computers-store-data

    Spotted an error? Suggest a correction or emailcorrections@contentlora.com.