Categories
BE8251 Notes

ASCII Character Encoding

ASCII Character Encoding

ASCII Character Encoding the name ASCII is an acronym for: American Standard Code for Information Interchange.

It is a character encoding standard developed several decades ago to provide a standard way for digital machines to encode characters.

The ASCII code provides a mechanism for encoding alphabetic characters, numeric digits, and punctuation marks for use in representing text and numbers written using the Roman alphabet.

As originally designed, it was a seven bit code.

The seven bits allow the representation of 128 unique characters.

All of the alphabet, numeric digits and standard English punctuation marks are encoded.

The ASCII standard was later extended to an eight bit code (which allows 256 unique code patterns) and various additional symbols were added, including characters with diacritical marks (such as accents) used in European languages, which don’t appear in English.

There are also numerous non-standard extensions to ASCII giving different encoding for the upper 128 character codes than the standard.

For example, The character set encoded into the display card for the original IBM PC had a non-standard encoding for the upper character set.

This is a non-standard extension that is in very wide spread use, and could be considered a standard in itself.

Some important things to points about ASCII code:

The numeric digits, 0-9, are encoded in sequence starting at 30h

The upper case alphabetic characters are sequential beginning at 41h The lower case alphabetic characters are sequential beginning at 61h

The first 32 characters (codes 0-1Fh) and 7Fh are control characters.

They do not have a standard symbol (glyph) associated with them. They are used for carriage control, and protocol purposes.

The include 0Dh (CR or carriage return), 0Ah (LF or line feed), 0Ch (FF or form feed), 08h (BS or backspace).

Most keyboards generate the control characters by holding down a control key (CTRL) and simultaneously pressing an alphabetic character key.

The control code will have the same value as the lower five bits of the alphabetic key pressed.

So, for example, the control character 0Dh is carriage return. It can be generated by pressing CTRL-M.

To get the full 32 control characters a few at the upper end of the range are generated by pressing CTRL and a punctuation key in combination.

For example, the ESC (escape) character is generated by pressing CTRL-[ (left square bracket).

Conversions Between Upper and Lower Case ASCII Letters

ASCII code chart that the uppercase letters start at 41h and that the lower case letters begin at 61h.

In each case, the rest of the letters are consecutive and in alphabetic order.

The difference between 41h and 61h is 20h. Therefore the conversion between upper and lower case involves either adding or subtracting 20h to the character code.

To convert a lower case letter to upper case, subtract 20h, and conversely to convert upper case to lower case, add 20h.

It is important to note that you need to first ensure that you do in fact have an alphabetic character before performing the addition or subtraction.

Ordinarily, a check should be made that the character is in the range 41h–5Ah for upper case or 61h-7Ah for lower case.

Conversion Between ASCII and BCD

ASCII code chart that the numeric characters are in the range 30h-39h.

Conversion between an ASCII encoded digit and an unpacked BCD digit can be accomplished by adding or subtracting 30h.

Subtract 30h from an ASCII digit to get BCD, or add 30h to a BCD digit to get ASCII.

Again, as with upper and lower case conversion for alphabetic characters, it is necessary to ensure that the character is in fact a numeric digit before performing the subtraction.

The digit characters are in the range 30h-39h.

For more details about classification of ASCII Character Encoding Click here

To see other topics in Basic Electrical and Electronics Engineering Click here

Click Here to Download the pdf of this topic ASCII Character Encoding

Other links 

Construction of DC GENERATOR

Bipolar Junction Transistor(BJT)

Binary Number System and Conversion

Hexadecimal Numbers

Logic Gates

Boolean Algebra

Adder & Flip Flop

Leave a Reply

Your email address will not be published. Required fields are marked *