Difference between revisions of "Tutorial4: Data Representation / Numbering Conversion / File Permissions"

From CDOT Wiki
Jump to: navigation, search
(Data Representation / Numbering Conversion / File Permissions)
(Tutorial Reference Material)
Line 45: Line 45:
|  style="padding-left:15px;"|File Permissions
|  style="padding-left:15px;"|File Permissions
* chmod<br>
* [http://man7.org/linux/man-pages/man1/chmod.1.html chmod]<br>
* umask<br><br>
* umask<br><br>

Revision as of 15:23, 17 January 2020

Data Representation / Numbering Conversion / File Permissions

Main Objectives of this Practice Tutorial

  • Understand the importance of how computers store data (i.e. data representation)
  • Understand the purpose of decimal, binary, octal and hexadecimal numbers
  • Perform various numbering conversions between the decimal, binary, octal and hexadecimal numbering systems
    by hand without the use of a computer or calculator
  • Identify which numbering system conversion method to use when required to perform a numbering conversion
  • Understand directory and regular file permissions
  • Learn how to set directory and regular file permissions with the chmod command (symbolic and octal methods)
  • Learn how to use the umask command to have permissions for directories and files automatically set upon their creation

Tutorial Reference Material

Course Notes
Numbering Conversion / File Permissions Reference
YouTube Videos
Course Notes:

Data Representation
  • Definition
  • Decimal, Binary, Octal, Hexadecimal Numbers

Numbering Conversion

  • Binary to Decimal / Decimal to Binary
  • Binary to Octal / Octal to Binary
  • Binary to Hexadecimal / Hexadecimal to Binary
  • Octal to Hexadecimal / Hexadecimal to Octal
File Permissions Instructional Videos:
  • x
  • x
  • x
  • x

Why Study Data Representation?

A series of binary numbers form a byte to represent numbers.
Bytes can be used to also represent characters. It is job of a program to know if bytes are used to represent numbers or characters. Learning to convert numbering systems
(like Hexadecimal to Binary) can be used to know how a character is represented in binary.

Data (treated as singular, plural, or as a mass noun) is any sequence of one or more symbols given meaning by specific act(s) of interpretation. Digital data is data that is represented using the binary number system of ones (1) and zeros (0), as opposed to analog representation.
Reference: https://en.wikipedia.org/wiki/Data_(computing)

Therefore, computers process and store information in a binary number system consisting of 0s and 1s. For many aspects of programming and networking, the details of data representation must be understood.

Reasons to Understand Data Representation:

  • C Programming: Sending information over networks, files
  • Web Development: Setting color codes for webpage background or text
  • Allowing or Limiting Unix / Linux File Access: Setting permissions for files and directories

In terms of this course, we will learn how a simple decimal number (integer) is stored into the computer system as a binary number. We will also learn other numbering systems (octal and hexadecimal) that can be used as a "short-cut" to represent binary numbers.

Decimal / Binary / Octal / Hexadecimal Numbering Systems


Numbering Conversions


File Permissions