LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Blogs > Bits and Pixels
User Name
Password

Notices



Concerning free software, programming, and whatever else I find interesting. Also the blog for my Web site, frigidcode.com.
Rate this Entry

Interesting facts about ASCII

Posted 02-03-2012 at 05:59 AM by hydraMax

Some interesting about ASCII, when it is represented as bytes in a binary system: (taken from Art of Assembly Language):

1) All alphabetic characters in standard ASCII can be converted to lowercase or uppercase simply by toggling the fifth bit (the first bit is bit zero). E.g.:

Code:
E = 01000101
e = 01100101
2) you can obtain the numeric equivalent of any of the numeric characters by subtracting 0x30 from the ASCII value.

3) Bits five and six will tell you which of the four ASCII groups your character is in:

Code:
Bit 6	Bit 5	Group
0	0	Control Characters
0	1	Digits & Punctuation
1	0	Upper Case & Special
1	1	Lower Case & Special
Posted in Uncategorized
Views 1354 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration