|
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Previously, the physical characteristics of the media were discussed and how digital logic levels are represented on the media. This chapter looks at how information that we, as human beings, understand such as alphanumeric characters are represented digitally. Computers understand numbers, plain and simply. They process information in binary using only the numbers 1 and 0. Unfortunately, humans do not work in binary but in alpha-numberics (numbers and alphabets). Characters such as numbers and the letters of the alphabet are assigned a 7 or 8 bit code to identify each character. This 7 or 8 bit code is a number that the computer can work with. The types of characters stored in a computer include:
There are 2 major translation codes (called character sets) that exist today:
The job of these character sets is to translate from the human world (where we use alpha-numeric characters) to the computer world (which uses binary numbers 1s and 0s). EBCDIC - Extended Binary Coded Decimal Interchange Code EBCDIC is used mainly by IBM mainframes and compatibles. It is not common in the PC LAN world unless you are connecting to the IBM mainframe world. In order to connect, you would require either an IBM 3270 terminal emulation program or a device called a gateway. Table 18-1 shows the EBCDIC translation table. Computers speak in binary code which is 1s and 0s. The computers do not know what the letter "A" is. Instead they speak of the letter "A" as the binary number 1100 0001. It is not easy for humans to remember binary numbers such as 1100 0001 but it is easier to remember the hexadecimal number C1. The hexadecimal number C1 is equal to the binary number 1100 0001 where C = 1100 in binary and 1 = 0001 in binary. In addition the hexadecimal number C1 is equal to the decimal number 193. The table 18-1 shows both the decimal (dec) number and the hexadecimal (hex) number for the capital letter "A". Lower case "a" is represented by the EBCDIC decimal code 129 or hexadecimal code 81. Besides character codes such as the previous letter "A", the EBCDIC code also defines control characters. These are characters that have special meaning. For example, the control character FF stands for Form Feed and is used by printers to advance one page or to eject a page. The decimal code for FF is 12 and the hexadecimal code is C. Both hexadecimal and decimal codes are indicated because many times, a program or interface will report the EBCDIC code in one or the other formats. You may have to use Table 18-1 to translate from the numerical code to the actual character. Note: Some EBCDIC codes are not defined and have no name.
Table 18-1 EBCDIC code
ASCII - American Standard Code for Information Interchange ASCII is the most popular code and is used by the majority of the computing world. ASCII itself is a 7 bit code which allows only 128 characters (27). Most applications follow IBM's Extended ASCII code which uses 8 bits and allows an addition 128 graphic characters for a total of 256 characters (28). We will be concentrating on 7 bit ASCII codes. Format effectors Format effectors control the movement of the cursor on the screen and the print head in a printer. The format effectors are:
Communication Controls Communication Controls are used in controlling data transmission over a communication network. They are used in both Asynchronous and Synchronous Transmissions. They are used in "handshaking".
Information Separators Information separators are used to separate database enquiries and files (in a PC - used as cursor arrows: Right, Left, Up, Down):
Additional Control Codes Of the remaining codes used by the computer, the most important ones are:
DC1 and DC2 are used in the Xon/Xoff software handshaking to control data transfer. Displaying ASCII codes directly to the screen You can type in the ASCII codes directly to the screen on IBM capatible computers. You press the "ALT" key and a 3 digit number on the numeric keypad . The 3 digit number is the ASCII decimal code for the character. You must use the numeric keypad, the QWERTY numbers will NOT work. For example, the character "A" corresponds to the ASCII decimal code 65. To access the ASCII code directly, hold down the ALT key and type in 065 on the numeric keypad. On releasing the ALT key, the letter A will appear on the screen. Table 18-2 shows the ASCII codes according to decimal numbers and hexadecimal numbers. If a network sniffer or analyzer is used, it will show raw data in decimal or hexadecimal formats. You may have to perform a manual translation using Table 18-2. Non Displayable ASCII characters The first 32 (0 - 31) characters of the ASCII code are non displayable characters. Sometimes depending on the font used, they will display as special characters such as a black or white heart, black or white face, etc.. To use these characters if you do not have a numeric keypad, you use the control key (CTRL) designated by the ^ symbol as follows:
00 Null ^@ 08 BS ^H 16 DLE ^P 24 CAN ^X 01 SOH ^A 09 HT ^I 17 DC1 ^Q 25 EM ^Y 02 STX ^B 10 LF ^J 18 DC2 ^R 26 SUB ^Z 03 ETX ^C 11 VT ^K 19 DC3 ^S 27 ESC ^[ 04 EOT ^D 12 FF ^L 20 DC4 ^T 28 FS ^\ 05 ENQ ^E 13 CR ^M 21 NAK ^U 29 GS ^] 06 ACK ^F 14 SO ^N 22 SYN ^V 30 RS ^^ 07 BEL ^G 15 SI ^O 23 ETB ^W 31 US ^_
Table 18-2 ASCII code
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If this page has helped you, please consider donating $1.00 to support the cost of hosting this site, thanks. |