Bits Bytes and Words Explained Through Text Storage
Understand bits bytes and words through text storage: eight-bit bytes, context-dependent machine words, and why CPU width does not set character size.
- Bits and Bytes
- Machine Words
- Text Encoding
On this page
The fundamental concepts of bits, bytes, and words are essential for understanding how information is stored and processed within a computer. These terms are the foundation upon which all digital data is built, allowing for both human readability and machine interpretation. In this article, I will explain how we can determine the size of any text in binary (bits) through these basic building blocks.
What’s a Bit?
The smallest unit of data that computers process is a bit, short for binary digit. A single bit represents either 0 or 1 in base-2, which are represented by an electrical signal on or off. Modern computers usually work with 8-bit groups called bytes, but you might also encounter other groupings such as half-words (16 bits), words (32 bits), or double-words (64 bits).
You’ll probably see “bit” and “byte” used together: “This word uses 50 bits, which is about six bytes.” However, when I refer to “bytes,” I mean groups of eight bits (8 bits = one byte). When someone refers to a “word” in the context of a processor’s architecture, it typically refers to its natural data size. For example, a 32-bit ARM processor would have a 32-bit word size, and AArch64 has 64-bit general-purpose registers but defines a word as 32 bits. The number of bits per word can vary depending on the processor or document. To get a general idea of the number of bytes used by a word, divide the stated number of bits by eight. That yields 16 bits equals two bytes, 32 bits equals four bytes, and so on. Keep in mind that “bit” and “byte” are different units, so we need to multiply or divide by eight when converting between them.

How Does the Word Size Differ Between Processors?
Some processors have different names for the size of their data. Take AArch64, for example. AArch64 is a 64-bit execution state in which Neon provides instructions to speed up floating-point operations. The term “word” may not always mean what you expect. Here, B means a byte, H is a half-word (two bytes), S is a word (four bytes), and D is a double-word (eight bytes). AArch64 has 31 general-purpose registers, which you can name as X0–X30, referring to them as 64-bit values. Alternatively, W0–W30 refer to the same register, viewed as a 32-bit value. Note that the definition of word size here depends on the architecture or document you are reading.
A Written Word’s Encoded Length
Let’s try some examples of repeated letters, separating a written word’s encoded length from the machine word size. For each g, you can represent the letter using the ASCII code point 103 decimal (which is 0x67 hex). So each g is 0x67. Let’s see:
g → 0x67
gggg → 0x67 0x67 0x67 0x67
In binary, that becomes 01100111, repeated four times. If we take four one-byte ASCII letters, that makes for four bytes, which is equivalent to 32 bits. Four g’s make for a payload size equal to a single AArch64 word. Now, if we consider a written word’s encoded length, it varies. But that’s just a concept; a CPU doesn’t care what “gggg” or “dog” means — their ASCII payloads are four and three bytes, respectively, but the actual amount of data read depends on the instructions used. How many bits a CPU actually loads and stores is determined by the instructions used, which aren’t specified here.
How Does UTF-8 Work With Bits And Bytes?
In the previous example, we used ASCII, a character encoding system that defines each character by assigning it a unique number between 0 and 127. However, in modern computing, Unicode is more commonly used, especially for multilingual documents. Unicode uses multiple bits per character to store characters, so we can have a much wider range of available characters. But this can affect how many bits we use to represent the entire text.
In our ASCII example above, we had four ASCII letters, making for four bytes. In UTF-8, there’s a similar scenario, though the representation is slightly different. 😊 is four UTF-8 bytes, which is the same number of bits. While the ASCII example contained four individual letters, this emoji is just one visible symbol. Because the emoji is a single Unicode scalar value, we need only one of the UTF-8 representations. This emoji occupies exactly as much space as the four letters, but keep in mind that other visible emoji can consist of multiple Unicode code points and take more than four bytes.
So why do we still need to understand the underlying concepts of bits and bytes? Because we need to know exactly how many bits and bytes we are dealing with before we start working with them. The capacity of any machine word does not change based on the actual characters it contains. Therefore, we must remember that no matter how we interpret the meaning of the characters, it doesn’t impact how many bits and bytes the computer itself uses to store that information.
Interpreting Text Through Its Byte Sequence
I already wrote about the relationship between bits, bytes, and words. What I hope I’ve demonstrated in this article is how to interpret binary text — in particular, text you can write down in English — through its byte sequence, along with the encoding that you’ve chosen to define those bytes. As long as you can decode the bytes back into your original text, it doesn’t matter if you group them as four-, eight-, or more-byte conceptual sizes. In fact, grouping them into larger chunks won’t even change the contents of your encoded data, since it’s all based on the exact same bytes. Even when you expand a word out to include all 64 bits inside of your register, you haven’t changed the definition of the word at all. Whether you can interpret those bytes as a single visible character depends on the encoding and what those bytes contain!
Sources
Try it yourself
Free, in your browser. Nothing you type is uploaded.
More in Binary Basics
- What Is Binary Code Used For? Text, Images, Audio and ProgramsLearn what binary code is used for in text, images, audio and programs, with an ASCII example and an explanation of why decoding depends on format.
- How to Find the LSB Bit in an ASCII ByteFind the LSB bit in an ASCII byte, see how changing it turns A into @, and distinguish bit significance from numbering and byte order.
- Who Invented Binary Code? Leibniz and the Road to ASCIILearn who invented binary code, what Leibniz contributed to binary arithmetic, and why ASCII text encoding has a separate history.