Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

What is ASCII?


Date: 12/19/2000 at 22:59:50
From: Monique
Subject: ASCII 

I am converting binary numbers to ASCII and I don't really know what 
ASCII is. Can you tell me, please?

Thank you.


Date: 12/20/2000 at 13:33:59
From: Doctor TWE
Subject: Re: ASCII 

Hi Monique - thanks for writing to Dr. Math.

ASCII is an acronym (an abbreviation that's pronounced like a word) 
that stands for the American Standard Code for Information 
Interchange. It is not a way of representing numbers, but rather a way 
of representing alpha-numeric information (text) in binary. Most 
computers today use ASCII, or some extension of it, for storing and 
transmitting text-based data.

Standard ASCII uses 7 bits to represent each character. But since only 
2^7 = 128 different characters can be represented this way, some 
computers have developed "extended ASCII" codes that use 8 (or more) 
bits per character, thus allowing more characters in the character 
set. The "IBM PC Extended Character Set" used in PCs is an example of 
an extended ASCII code.

As an example of ASCII, here is how "Dr. TWE" would be represented in 
ASCII:

     char.   ASCII (binary)   Hex   Dec
     -----   --------------   ---   ---
       D        100 0100      44     68
       r        111 0010      72    114
       .        010 1110      2E     46
     space      010 0000      20     32
       T        101 0100      54     84
       W        101 0111      57     87
       E        100 0101      45     37
       
In the chart above, I have represented the ASCII codes in binary, as 
the computer would represent them. Since writing ASCII codes in binary 
requires a lot of space (and is prone to errors), we often use 
hexadecimal or decimal as a "shorthand" notation. I have included the 
hex and decimal equivalents on the chart above.

For a complete chart of standard ASCII, see "Standard ASCII Chart" at:

   http://distance_ed.avc.edu/avcoll/faculty/ebeyer/CA103/StandardASCII_Chart.htm   

Since most computers use 8 bits to represent a character, this chart 
adds a space (a 0) at the beginning of each character to "fill out" 
the 8 bits.

For a chart of the IBM PC Extended Character Set, see "The IBM (DOS) 
Extended ASCII Character Set" at:

   http://www.sageservices.bc.ca/ascii-codes.html   

For information on converting among binary, hexadecimal and decimal 
see our "Number Bases" FAQ page at:

   http://mathforum.org/dr.math/faq/faq.bases.html   

I hope this helps. If you have any more questions, write back.

- Doctor TWE, The Math Forum
  http://mathforum.org/dr.math/   
    
Associated Topics:
High School Calculators, Computers

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/