HOTLINE

Call For QUERY +977-9808780709

NUMBER SYSTEM


 

NUMBER SYSTEM

        The number system is a way to represent numbers using a consistent set of symbols. Different number systems are used in various fields, especially in computing. Here are the main types of number systems:

    Decimal Number System (Base 10)
        Symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
        Usage: This is the standard system for denoting integer and non-integer numbers. It is used in                       everyday arithmetic and common counting.
        Example: 153, 42.7

    Binary Number System (Base 2)
        Symbols: 0, 1
        Usage: This system is used internally by almost all modern computers and computer-based devices             because it is straightforward to implement with digital electronic circuitry.
        Example: 1010 (which is 10 in decimal), 1101

    Octal Number System (Base 8)
        Symbols: 0, 1, 2, 3, 4, 5, 6, 7
        Usage: It is sometimes used in computing as a more compact representation of binary numbers. Each         octal digit represents three binary digits.
        Example: 17 (which is 15 in decimal), 345

    Hexadecimal Number System (Base 16)
        Symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
        Usage: This system is used in computing and digital electronics as a human-friendly representation of binary-coded values. Each hexadecimal digit represents four binary digits.
        Example: A (which is 10 in decimal), 1F4 (which is 500 in decimal)

Converting Between Number Systems

 Decimal to Binary
        Repeatedly divide the decimal number by 2, keeping track of the remainders. The binary representation is the sequence of remainders read in reverse (from bottom to top).

    Example: Convert 13 to binary.

13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1

Reading the remainders from bottom to top, we get 1101.

Binary to Decimal
    Multiply each binary digit by 2 raised to the power of its position, counting from right to left starting at 0, then sum the results.

Example: Convert 1101 to decimal.
1*(2^3) + 1*(2^2) + 0*(2^1) + 1*(2^0) = 8 + 4 + 0 + 1 = 13

Decimal to Octal
          Repeatedly divide the decimal number by 8, keeping track of the remainders. The octal representation is the sequence of remainders read in reverse.

Example: Convert 58 to octal.
58 ÷ 8 = 7 remainder 2
7 ÷ 8 = 0 remainder 7

Reading the remainders from bottom to top, we get 72.

Octal to Decimal
    Multiply each octal digit by 8 raised to the power of its position, counting from right to left starting at 0, then sum the results.

Example: Convert 72 to decimal.
7*(8^1) + 2*(8^0) = 56 + 2 = 58

Decimal to Hexadecimal
    Repeatedly divide the decimal number by 16, keeping track of the remainders. The hexadecimal representation is the sequence of remainders read in reverse.

Example: Convert 254 to hexadecimal.
254 ÷ 16 = 15 remainder 14 (E in hexadecimal)
15 ÷ 16 = 0 remainder 15 (F in hexadecimal)

Reading the remainders from bottom to top, we get FE.

Hexadecimal to Decimal
    Multiply each hexadecimal digit by 16 raised to the power of its position, counting from right to left starting at 0, then sum the results.

Example: Convert FE to decimal.
    15*(16^1) + 14*(16^0) = 240 + 14 = 254

Summary of Conversions
    Decimal to Binary: Divide by 2, collect remainders.
    Binary to Decimal: Sum binary digits times powers of 2.
    Decimal to Octal: Divide by 8, collect remainders.
    Octal to Decimal: Sum octal digits times powers of 8.
    Decimal to Hexadecimal: Divide by 16, collect remainders.
    Hexadecimal to Decimal: Sum hexadecimal digits times powers of 16.

Understanding these number systems and their conversions is crucial for various computing tasks, such as programming, data representation, and networking.

No comments:

Post a Comment