Download presentation
Presentation is loading. Please wait.
Published byMarian Miles Modified over 9 years ago
2
Hans-Peter Plag October 9, 2014 Session 2 Storing Information File Formats http://www.mari.odu.edu Accessing Information Processing Information
3
Hardware: (smart phone, tablet,) laptop/PC, work station, main frame, clusters, cloud 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.” computer hardwares and prgrams. Tsystem is an esseprograms usuall User interface: non-interactive teletype (command line) button/keys graphical user interface (GUI) 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: type: human, program, equipment, level: low to highly experienced, experts constraints: concepts, value systems, capabilities,... User Interface
6
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,...
7
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
8
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:
9
Information is stored in files How is information stored in files? Basics about number systems Special basis is b = 2: Example: binary number system Other important systems: b = 8: Octal b = 16: Hex
10
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 Byte: 8 bits bitbit bytebyte Can represent numbers from 0 to 255 Can also be used to represent 256 symbols, characters, codes
11
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.character- encoding schemedes 128 specifiee charactewith Teletype machi
12
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-bit ASCII 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.eight-bit encodings that inc asers.
13
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
14
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 Binary files: - operating system, program language, user dependent - Unix/Linux - Mac OS Classic - Windows (MS Dos)
15
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
16
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.