Originally published by Robert Beisert at fortcollinsprogram.robert-beisert.com

CS 101 – Bytes and ASCII

(Apologies for the relatively content-free submission, but my buffer ran dry. This is a bit of a rushed post.)

We have seen that a computer represents data as binary bits. These bits are commonly grouped into eight-bit units, which we call bytes.

One byte can store up to 256 possible values. These values (in this case, the decimal number 133) can be represented in the following ways:

133 – Decimal

10000101 – Binary

85 – Hex

ASCII

When we want to represent text (for example, this blog post), we have to store the letters in binary. The simplest method, though most complex in practice, would be to record the exact location of every pixel (“picture element” – a dot on the screen). That’s very time consuming.

Instead, we use a conversion code, where we determine in advance what each character looks like, then map that description to a short binary code.

Many simple applications use the ASCII (American Standard Code for Information Interchange) coding system. This system uses seven bits (one byte, where the first digit is always 0), to store the characters on your keyboard. This is an efficient mechanism for recording common American English characters.

For a full table, visit ASCII TABLE. I could copy all that content here, but that seems pointless.

 

Again, sorry for the poor content today.