How Bits and Bytes Work (2024)

Bytes are frequently used to hold individual characters in a text document. In the ASCII character set, each binary value between 0 and 127 is given a specific character. Most computers extend the ASCII character set to use the full range of 256 characters available in a byte. The upper 128 characters handle special things like accented characters from common foreign languages.

You can see the 127 standard ASCII codes below. Computers store text documents, both on disk and in memory, using these codes. For example, if you use Notepad in Windows 95/98 to create a text file containing the words, "Four score and seven years ago," Notepad would use 1 byte of memory per character (including 1 byte for each space character between the words -- ASCII character 32). When Notepad stores the sentence in a file on disk, the file will also contain 1 byte per character and per space.

Try this experiment: Open up a new file in Notepad and insert the sentence, "Four score and seven years ago" in it. Save the file to disk under the name getty.txt. Then use the explorer and look at the size of the file. You will find that the file has a size of 30 bytes on disk: 1 byte for each character. If you add another word to the end of the sentence and re-save it, the file size will jump to the appropriate number of bytes. Each character consumes a byte.

If you were to look at the file as a computer looks at it, you would find that each byte contains not a letter but a number -- the number is the ASCII code corresponding to the character (see below). So on disk, the numbers for the file look like this:

 F o u r a n d s e v e n70 111 117 114 32 97 110 100 32 115 101 118 101 110

By looking in the ASCII table, you can see a one-to-one correspondence between each character and the ASCII code used. Note the use of 32 for a space -- 32 is the ASCII code for a space. We could expand these decimal numbers out to binary numbers (so 32 = 00100000) if we wanted to be technically correct -- that is how the computer really deals with things.

The first 32 values (0 through 31) are codes for things like carriage return and line feed. The space character is the 33rd value, followed by punctuation, digits, uppercase characters and lowercase characters. To see all 127 values, check out Unicode.org's chart.

We'll learn about byte prefixes and binary math next.

How Bits and Bytes Work (2024)

FAQs

How Bits and Bytes Work? ›

Bits are primarily used to represent data use and transmission speeds of internet, telephone, and streaming services. The bit rate refers to how many bits are transmitted per second. Bytes, on the other hand, are used to express storage sizes. 1 byte is equal to 8 bits.

Why is 1 byte equal to 8 bits? ›

In the 60s, there was a popular integer encoding called binary-coded decimal (or BCD for short) that encoded every decimal digit in 4 bits. So if you want to be able to easily work with binary-coded decimal, your byte size should be a multiple of 4 bits, like 8 bits!

How do you understand bytes and bits? ›

The key to understanding the terminology for storage is remembering that eight bits equals one byte. So a one Megabyte file is actually an 8,000,000 bit file. This means the file is composed of 8,000,000 ones and zeroes, and it can be stored at a rate of one MB/s or 8,000,000 bits/s.

How are bits and bytes processed? ›

The charge determines the state of each bit, which, in turn, determines the bit's value. Although a computer might be able to test and manipulate data at the bit level, most systems process and store data in bytes. A byte is a sequence of eight bits that are treated as a single unit.

How many bytes are in a bit? ›

Because bits are so small, you rarely work with information one bit at a time. Bits are usually assembled into a group of eight to form a byte. A byte contains enough information to store a single ASCII character, like "h".

Why do computers use bytes instead of bits? ›

The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit of memory in many computer architectures.

Why 8-bit and not 10? ›

If you're working in a high-end Hollywood retouching studio or in retouching where individual pixels are zoomed to more than 500%, you'll probably require 10-bit. But for most of the rest of us the 8-bit + FRC monitor is adequate, accessible, and affordable.

What are four bits called? ›

A group of 4 bits is known as a nibble. 4-bit integers, or other data units, are those that are 4 bits wide in computer architecture.

Is it 1024 bits or 1000 bits? ›

A kilobyte AKA 'KB' is a thousand bytes; a kilobit AKA 'kb' is 1,000 bits. Kilo is an ISU or 'SI' standard prefix for 'a thousand'. If you're talking about memory sizes (ROM, RAM, CPU cache, etc.) it will be 1024 bits, because of the way the memory cells are organized.

Is Ram a bit or byte? ›

Generally, memory (RAM) and disk sizes are expressed in bytes. People refer to bits mostly for the width of the databus and of the internal registers of a computer. So people can talk of 32 bits or 64 bits processor and maybe your question was related to that.

What is the theory of bits and bytes? ›

Bits are primarily used to represent data use and transmission speeds of internet, telephone, and streaming services. The bit rate refers to how many bits are transmitted per second. Bytes, on the other hand, are used to express storage sizes. 1 byte is equal to 8 bits.

How do computers read bits? ›

The second (0) to the seventh (1) digits are read from right to left. As the bit position increases from one to eight, the previous decimal value is multiplied by two. That's why the first bit has a value of 1, the second bit has a value of 2, the third bit has a value of 4 and so on.

What is the biggest byte? ›

A yottabyte is the largest unit approved as a standard size by the International System of Units (SI). The yottabyte is about 1 septillion bytes -- or, as an integer, 1,000,000,000,000,000,000,000,000 bytes.

What is the relationship between bit and byte? ›

A byte holds eight bits. A bit is either a 0 or a 1 using binary. By combining eight bits into one byte, a byte can represent 256 different symbols.

Is internet speed in bits or bytes? ›

Internet speed is measured in bits per second. 1 Kbps (kilobits per second) = 1,000 bits per second. 1 Mbps (megabits per second) = 1 million bits per second.

Why is a byte 8 bits and not 7? ›

The main reason why it's 8 bits and not 7 is that is needs to be a power of 2. Also: imagine what nibbles would look like in 7-bit bytes.. Also ideal (and fast) for conversion to and from hexadecimal.

Why are bytes in multiples of 8? ›

To this day, the 8 bit “byte” is the basic unit of computer communication. So multiples of eight are used if more than 256 combinations are needed since hardware/software systems are made to work with groups of 8 bits. And, so you'll commonly see reference to things like “24-bit color”, and “16-bit sound”.

Why do we typically use 8 bits? ›

A bit is the smallest unit of computer information. It's essentially a single binary data point; either yes or no, on or off, up or down. A byte on the other hand is a unit of memory that usually contains 8 bits. This is because historically, 8 bits are needed to encode a single character of text.

Is one byte is equal to 8 bits and a nibble is equal to? ›

In computers and digital technology, a nibble (pronounced NIHB-uhl; sometimes spelled nybble) is four binary digits or half of an eight-bit byte. A nibble can be conveniently represented by one hexadecimal digit. Like crumb, nibble carries on the "edible data" metaphor established with bit and byte.

Top Articles
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 6180

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.