COMPUTER SCIENCE

This is a Number system used in our daily lives

Number System

Here are some examples of different number system used in computer:

The binary number system is used in computers to represent data and perform calculations. A computer can understand only the “on” and “off” state of a switch. These two states are represented by 1 and 0. The combination of 1 and 0 form binary numbers. Machine language is binary, so it is necessary to discuss how to measure the data stored in a computer. Bit and Byte are the units to measure data. A bit is either a 0 or a 1, while a group of 8 bits is a byte.

The hexadecimal number system is often used in computer programming to represent binary data in a more compact and readable form. For example, colors in HTML and CSS are often represented using hexadecimal values.

The octal number system is used in computer systems for representing file permissions in Unix-like operating systems.

The decimal number system is used in computers for performing arithmetic operations and representing data in a way that is easily understandable by humans.

The octal number system is used in Unix-like operating systems to represent file permissions. Each group of 3 bits represents read, write, and execute permissions for either the user, group, or “other people. For example, file mode rwxr-xr-x would be represented as 0755 in octal.

Octal is used as a shorthand for representing file permissions on UNIX systems because it has the advantage of not requiring any extra symbols as digits (the hexadecimal system is base-16 and therefore needs six additional symbols beyond 0–9)

A file permission string like `rwxr-xr-x` is used in Unix-like operating systems to represent the permissions of a file or directory. The string is made up of 10 characters, with the first character indicating the type of file (e.g., `-` for a regular file, `d` for a directory), and the remaining 9 characters representing the permissions for the file’s owner, group, and others.

The 9 permission characters are divided into 3 groups of 3 characters each. The first group represents the permissions for the file’s owner, the second group represents the permissions for the file’s group, and the third group represents the permissions for others.

Each group of 3 characters represents the read (`r`), write (`w`), and execute (`x`) permissions. If a permission is granted, the corresponding character is displayed (e.g., `r` for read permission). If a permission is not granted, a dash (`-`) is displayed instead.

So, in the example `rwxr-xr-x`, the first character `-` indicates that it is a regular file. The next 3 characters `rwx` indicate that the owner of the file has read, write, and execute permissions. The next 3 characters `r-x` indicate that the group has read and execute permissions but not write permission. The last 3 characters `r-x` indicate that others have read and execute permissions but not write permission.

The hexadecimal number system, often shortened to “hex,” is a base-16 number system. This means it uses 16 distinct symbols to represent numbers. The symbols used are the digits 0-9 and the letters A-F, with A representing 10, B representing 11, and so on up to F representing 15.

Hexadecimal is often used in computer science and programming because it provides a more human-friendly way of representing binary numbers. Each hexadecimal digit represents four binary digits (bits), so it is a more compact representation. For example, the binary number 11010101 can be represented as D5 in hexadecimal.

To convert a hexadecimal number to decimal, you can use the same method as with other positional number systems: multiply each digit by the appropriate power of the base (16) based on its position and then add the results. For example, to convert the hexadecimal number 3F2 to decimal, you would calculate (3 x 16^2) + (15 x 16^1) + (2 x 16^0) = 1010.

Operations and Conversion on another blog..

My Latest Posts

• • •

  • INCOMING NUMBER SYSTEM
    Hey! Finally Number system is coming on TECHFOX on 30 July 2023; 8:35 pm Stay Tuned for more

• • •

Design a site like this with WordPress.com
Get started