ASCII (American Standard Code for Information Interchange)



ASCII (American Standard Code for Information Interchange)

ASCII is the most common format for text files in computers and on the Internet. In an ASCII file, each alphabetic, numeric, or special character is represented with a 7-bit binary number (a string of seven 0s or 1s). 128 possible characters are defined.

UNIX and DOS-based operating systems (except for Windows NT) use ASCII for text files. Windows NT uses a newer code, Unicode. IBM's System 390 servers use a proprietary 8-bit code called EBCDIC. Conversion programs allow different operating systems to change a file from one code to another.

BINARY

Binary is the base two number system that computers use to represent data. It consists of only two numbers: "0" and "1". In the table below, binary numbers are shown with their decimal equivalents:

|Binary |Decimal |

|0 |0 |

|1 |1 |

|10 |2 |

|11 |3 |

|100 |4 |

|101 |5 |

|110 |6 |

|111 |7 |

|1000 |8 |

|1001 |9 |

|1010 |10 |

|etc |etc |

BIT (BINARY DIGIT)

A bit is the smallest unit of data in a computer. A bit has a single binary value, either 0 or 1. Although computers usually provide instructions that can test and manipulate bits, they generally are designed to store data and execute instructions in bit multiples called bytes. In most computer systems, there are eight bits in a byte. The value of a bit is usually stored as either above or below a designated level of electrical charge in a single capacitor within a memory device.

LAB ACTIVITY

HOW TO READ ASCII DATA?

← From File menu choose Read Ascii Data (Fixed Colums

Click Browse in the Define Fixed Variables dialog box to select the data file.

For each variable, enter a variable name, the start and end column locations, and a data type.

Click Add to enter each variable definition.

← From File menu choose Read Ascii Data (Freefield

Click Browse in the Define Freefield Variables dialog box to select the data file.

For each variable, enter a variable name and data type (numeric or string).

For string variables, specify the variable width (maximum number of characters).

Click Add to enter each variable definition.

|For Freefield |For Fixed Column |

|1,2,45,a |1 2 45 a |

|1,1,50,a |1 1 50 a |

|1,1, 43,a |1 1 43 a |

|1,2,20,a |1 2 20 a |

|1,2,35,b |1 2 35 b |

|1,1,25,b |1 1 25 b |

|2,1,30,a |2 1 30 a |

|2,2,15,a |2 2 15 a |

|2,1,35,a |2 1 35 a |

|2,2,23,b |2 2 23 b |

|2,2,48,a |2 2 48 a |

|2,1,36,a |2 1 36 a |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download