fortypoundhead.com

What is a Byte?

Posted On 2007-04-12 by FortyPoundHead
Keywords: Memory
Tags: General Tutorial 
Views: 1720


In computer memory terms, the definition of a byte is a collection of eight bits. Unlike a bit that can hold the value of zero or one, a byte of memory can hold a value from 0-255.

Think of the below number as eight individual bits making up a byte, all turned off. The value is 0.

00000000

If we turn on the right-most bit in the byte, the 0th bit (computer scientists love to count starting from the number 0), the value is now one.

00000001

What if we want to add 1 to the value? Remember that a bit can only hold values of 0 or 1. So how is the number 2 represented? We turn on the bit to the left, the 1st bit, like so:

00000010

If the first bit is a 1 and the 0th bit is 0, the total value of all bits is 2. Now what if we want to add 1 to create a byte value of 3? Turn that 1st bit on again.

00000011

What happens if we want to create a value of 4? Remember how the 1st bit represented the number 2? The 2nd bit represents the number 4. Turn it on and turn the other two bits off.

00000100

And so forth. Here is a table:

Bit 7 - Value of 128
Bit 6 - Value of 64
Bit 5 - Value of 32
Bit 4 - Value of 16
Bit 3 - Value of 8
Bit 2 - Value of 4
Bit 1 - Value of 2
Bit 0 - Value of 1

An aside - If you know what exponentiation means, think of each bit taking on the value of two to the power of the bit number. 2 to the power of 0 is 1, 2 to the power of 1 is 2, etc.

So to get a byte value of 255, let's turn all of the bits on.

11111111

Several bytes can be strung together to form kilobytes, megabytes, gigabytes, and terabytes.


About the Author

FortyPoundHead has posted a total of 1974 articles.

 


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.80.169.119

Before you can post, you need to prove you are human. If you log in, this test goes away.




Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers