1 / 16

Hans-Peter Plag October 9, 2014

Session 2. Storing Information. File Formats. Accessing Information. Processing Information. Hans-Peter Plag October 9, 2014. http://www.mari.odu.edu. User: type : human, program, equipment, level: low to highly experienced, experts

Télécharger la présentation

Hans-Peter Plag October 9, 2014

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Session 2 Storing Information File Formats Accessing Information Processing Information Hans-Peter Plag October 9, 2014 http://www.mari.odu.edu

  2. User: • type: human, program, equipment, • level: low to highly experienced, experts • constraints: concepts, value systems, capabilities, ... User Interface Application: Application software is a set of one or more programs designed to carry out operations for a specific application. Application software cannot run on itself but is dependent on system software to execute. Examples of application software include MS Word, MS Excel, a console game, a library management system, a spreadsheet system etc. User Interface • User interface: • non-interactive • teletype (command line) • button/keys • graphical user interface (GUI) Operating system: “An operating system (OS) is software that manages computer hardware and software resources and provides common services for computer programs. The operating system is an essential component of the system software in a computer system. Application programs usually require an operating system to function.” Hardware: (smart phone, tablet,) laptop/PC, work station, main frame, clusters, cloud

  3. Information is stored in files How is information stored in files? We’ll come back to this Previously: most operating system did not use file name as information Today: many operating system, GUIs and applications use file type as information: .txt, .doc, .docx, .ppt, .pdf, .jpg, .exe, .py, .f90, ...

  4. Files are organized in file systems Linux/Unix: /directory/sub-directory/sub-directory/... File system control: Linux: mainly up to user Mac: some predefined directories needed for GUI/applications to work Discussion: In system-controlled file systems, it can be difficult to find something In user-controlled systems, users need to have organization skills

  5. Information is stored in files How is information stored in files? Basics about number systems Decimal number, can be represented as: Any decimal number can be represented as: Any number to basis b can be represented as:

  6. Information is stored in files How is information stored in files? Basics about number systems Special basis is b = 2: binary number system Example: Other important systems: b = 8: Octal b = 16: Hex

  7. How is information stored in files? Basics element in a computer is a switch with two states: 0 and 1 All information is stored using the binary number system bit byte Byte: 8 bits Can represent numbers from 0 to 255 Can also be used to represent 256 symbols, characters, codes

  8. How is information stored in files? Fundamental coding is ASCII ASCII: American Standard Code for Information Interchange: is a character-encoding scheme. Originally based on the English alphabet, it encodes 128 specified characters into 7-bit binary integers. The characters encoded are, numbers 0 to 9; lower case letters a to z; uppercase letters A to Z; basic punctuation symbols; control codes that originated with Teletype machines; and space.

  9. How is information stored in files? Fundamental coding is ASCII Extended ASCII (or high ASCII) is eight-bit or larger character encodings that include the standard seven-bitASCII characters as well as others. The use of the term is sometimes criticized,[1][2][3] because it can be mistakenly interpreted that the ASCII standard has been updated to include more than 128 characters or that the term unambiguously identifies a single encoding, both of which are untrue.

  10. How is information stored in files? File coding: - ASCII/extended ASCII: source code, text files, data, ... - can be edited in a text editor, printed, displayed in screen, ... - binary: executable programs, application files (word, excel, ...), graphics, databases, ... - cannot be edited in text editor, printed, viewed; require program to read/decode

  11. How is information stored in files? ASCII File structure: - depends on programming language - earlier languages: record based - today: many systems make no assumptions about structure - Unix/Linux - Mac OS Classic - Windows (MS Dos) Binary files: - operating system, program language, user dependent

  12. Basic operations to access information stored in a file are: - opening a file - reading a file - decoding information - processing information - writing information to file - closing a file Input from keyboard/screen can be consider similar to input from files - Fortran: reads records, not individual characters - C/C++: can read characters and records - PHP/Python: read full files or parts

  13. Use a simple syntax to outline a procedure: - read an ASCII file (generated in an editor) - Separate the contents into logical record indicated by the string ‘\n’ - Write a file with records separated by ‘|’ Use a simple syntax to outline a procedure that can decode a command line consisting of: command-name p1=value p2=value ... pn=value

More Related