`
universsky
  • 浏览: 96855 次
文章分类
社区版块
存档分类
最新评论

Ascii Codes

 
阅读更多

Ascii Codes

It is a very well-known fact that computers can manage internally only 0s (zeros) and 1s (ones). This is true, and by means of sequences of 0s and 1s the computer can express any numerical value as its binary translation, which is a very simple mathematical operation (as explained in the paper numerical bases).

Nevertheless, there is no such evident way to represent letters and other non-numeric characters with 0s and 1s. Therefore, in order to do that, computers use ASCII tables, which are tables or lists that contain all the letters in the roman alphabet plus some additional characters. In these tables each character is always represented by the same order number. For example, the ASCII code for the capital letter "A" is always represented by the order number 65, which is easily representable using 0s and 1s in binary: 65 expressed as a binary number is 1000001.

The standard ASCII table defines 128 character codes (from 0 to 127), of which, the first 32 are control codes (non-printable), and the remaining 96 character codes are representable characters:

* 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7
NUL SOH STX ETX EOT ENQ ACK BEL BS TAB LF VT FF CR SO SI
DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US
! " # $ % & ' ( ) * + , - . /
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~

* This panel is organized to be easily read in hexadecimal: row numbers represent the first digit and the column numbers represent the second one. For example, the "A" character is located at the 4th row and the 1st column, for that it would be represented in hexadecimal as 0x41 (65).

Because most systems nowadays work with 8bit bytes, which can represent 256 different values, in addition to the 128 standard ASCII codes there are other 128 that are known as extended ASCII, which are platform- and locale-dependent. So there is more than one extended ASCII character set.

The two most used extended ASCII character sets are the one known as OEM, that comes from the default character set incorporated by default in the IBM-PC and the other is the ANSI extend ASCII which is used by most recent operating systems.

The first of them, the OEM character set, is the one used by the hardware of the immense majority of PC compatible machines, and was also used under the old DOS system. It includes some foreign signs, some marked characters and pieces to represent panels.


The ANSI character set is a standard that many systems incorporate, like Windows, some UNIX platforms and many standalone applications. It includes many more local symbols and marked letters so that it can be used with no need of being redefined in many more languages:


分享到:
评论

相关推荐

    C# ASCII码和字符串互转

    string asciiCodes = asciiString.ToString(); ``` 4. ASCII码字符串转字符数组: 对于一个由ASCII码组成的字符串,例如"72 101 108 108 111",你可以将其分割成整数并转换回字符。首先,使用`Split()`方法将...

    ASC和字符串互转

    String[] asciiCodes = asciiString.split(","); StringBuilder output = new StringBuilder(); for (String code : asciiCodes) { output.append((char) Integer.parseInt(code)); } return output.toString...

    An Introduction to Programming with C++

    appEndix B aSCii Codes 595 appEndix C Common Syntax errors 597 appEndix d How To Boxes 599 index 603 The answers pdf and data files can be found online at CengageBrain com Brief contents

    Wrox.Beginning Visual C++ 2008

    Introduction Chapter 1: Programming with Visual C++ 2008 Chapter 2: Data, Variables, and Calculations Chapter 3: Decisions and Loops ...Appendix B: ASCII Codes Appendix C: Windows Message Types Index

    ASCII.rar_The English

    ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many more characters...

    椭圆曲线密码系统的matlab实现

    asciiCodes = double(str); encodedStr = asciiCodes; end ``` 通过以上方法,我们可以在MATLAB环境中成功实现椭圆曲线密码系统,并将其应用于汉字的加密与解密。这种技术不仅扩展了椭圆曲线密码的应用范围,也为...

    杭电题目acm答案

    - **Examples**: Using integers in `1089 A+B for Input-Output Practice (I)` and handling ASCII codes in `2000 ASCII Code Sorting`. - **Control Structures**: Problems often require the use of loops ...

    ARM.Assembly.Language.Programming.&.Architecture

    2) Who uses ARM? Currently ARM CPU is licensed and produced by more than 100 companies and is the dominant CPU chip in both cell phones and tablets. Given its RISC architecture...Appendix F: ASCII Codes

    c++官方网站标准参考资料

    Ascii Codes, Numerical Bases, Boolean Operations ), Information( C++ Language FAQ, History of C++, A brief description ), Sourcecode( 这个太多了,不一一列出, C++ Tutorial Sources(这是本很不错的...

    ,ARM9 S3C2440开发的不停循环检测温度值,并转换为ascii码,通过串口传出来的ADS工程

    ARM9 S3C2440开发的不停循环检测温度值,并转换为ascii码,通过串口传出来的ADS工程-ARM9 S3C2440 development of non-stop loop detection temperature values and convert to ascii codes, coming out through the...

    计算机导论课件:Chapter 1 Computers and Digital Basics.pptx

    For example, ASCII codes represent letters and symbols, while pixels represent images, and samples of analog audio signals are digitized using pulse-code modulation (PCM). This conversion allows for ...

    ascii-codes:ASCII 表参考和查找函数

    npm install ascii-codes 用法 var ascii = require ( 'ascii-codes' ) ; var assert = require ( 'assert' ) ; assert . equal ( "A" , ascii . symbolForDecimal ( 65 ) ) ; assert . equal ( "A" , ascii . ...

    The Indispensable PC Hardware Book - rar - part1. (1/7)

    ASCII Code. Negative Integers and Two's Complement. Hexadecimal Numbers. BCD Numbers. Little Endian Format and Intel Notation. Logic Gates. Basic Logical Elements. CMOS Inverters as Low...

    将Ascii码串转换成字符串

    string = ''.join(chr(code) for code in ascii_codes) print(string) # 输出: 'Alicopter' ``` 在实际应用中,ASCII码转换可以用于各种场景,如网络通信、文件编码解码、日志分析等。了解并掌握ASCII码转换的方法...

    Python判断文件和字符串编码类型的实例

    # 说明:UTF兼容ISO8859-1和ASCII,GB18030兼容GBK,GBK兼容GB2312,GB2312兼容ASCII CODES = ['UTF-8', 'UTF-16', 'GB18030', 'BIG5'] # UTF-8 BOM前缀字节 UTF_8_BOM = b'\xef\xbb\xbf' # 获取文件编码类型 def

    ASCII码与汉字编码.pdf

    ### ASCII码与汉字编码知识点详解 #### 一、ASCII码 **定义:** ASCII码,全称为American Standard Code for Information Interchange(美国标准信息交换码),是一种基于拉丁字母的一套电脑编码系统。它主要用于...

    键盘ASCII码和Ctrl组合键码的获取

    在Windows系统中,Ctrl组合键通常会生成一个虚拟键码(Virtual Key Codes, VK Codes),这些键码不是ASCII码,而是系统级别的标识符。例如,Ctrl+A的组合在Windows中可能会被识别为VK_A(65),但这并不意味着它与...

    前端开源库-ascii-art

    ANSI编码(ANSI escape codes)则是一种控制终端显示格式的标准,它允许程序员通过特定的控制序列改变文本的颜色、背景色、光标位置等属性。在前端开发中,利用ANSI编码可以创建多彩的命令行输出,尤其在CLI(命令行...

    《Cracking Codes With Python》书籍示例代码

    8. **编码与解码**:书中可能还会讨论不同字符编码,如ASCII、Unicode(UTF-8)等,以及如何在Python中进行编码转换。 9. **网络通信与安全**:Python的`socket`库允许创建网络连接,而`ssl`库则支持SSL/TLS协议,...

Global site tag (gtag.js) - Google Analytics