Amazon Prime




 
Tagged
  • Maths
  • Number System
  •  

    Number System in Computer Science

    Number System

    The number system is a way to represent numbers. The number systems are classified as below :

    • Decimal Number System
    • Binary Number System
    • Octal Number System
    • Hexadecimal Number System

    Number Systems

    Decimal Number System

    In the decimal number system, the digits from 0 to 9 are used to represent numbers. In decimal numbers, each digit has a value based on its position which is known as place value. The value of the position increases by 10 times moving from right to left in the number.

    As we use 10 digits to represent a number,  it is also known as the Base 10 number system.

    1Eg : 175 in decimal representation is as follows
    2175 = 1 * 10² + 7 * 10¹ + 5 * 10⁰
    3 = 100 + 70 + 5

    Binary Number System

    In the binary number system, every number is represented using a combination of 0 and 1 which are called bits. In the binary number system, positional notation is used in which each digit is multiplied by the appropriate power of two based on its position. 

    • 0 bit means No or False
    • 1 bit means Yes or True

    As we use only two bits to represent a number, it is also known as the Base 2 number system.

    1Eg: 175 represented in binary number as 10101111
    2175 = 128 + 0 + 32 + 0 + 8 + 4 + 2 + 1
    3 = 1 * 2⁷ + 0 * 2⁶ + 1 * 2⁵ + 0 * 2⁴ + 1 * 2³ + 1 * 2² + 1 * 2¹ + 1 * 2⁰
    4It means (10101111)₂ = (175)₁₀

    Octal Number System

    In the Octal Number System, every number is represented using a combination of 0 to 7 numbers. In Octal number system positional notation is used in which each digit is multiplied by the appropriate power of 8 based on its position.

    As we use 8 digits to represent a number, it is known as the Base 8 number system. Octal number is expressed as number₈ .

    1Eg: 175 represented in octal number as (257)₈
    2175 = 2 * 8² + 5 * 8¹ + 7 * 8⁰
    3It means (257)₈ = (175)₁₀

    Hexadecimal Number System

    In the Hexadecimal Number System, every number is represented using a combination of 0 to 9 numbers and A to F letters. Here letters A to F represent numbers from 10 to 15. i.e A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

    As we use 16 digits to represent a number, it is known as the Base 16 number system.

    In Octal number system positional notation is used in which each digit is multiplied by the appropriate power of 16 based on its position. Octal number is expressed as number₁₆ .

    1Eg: 175 represented in hexadecimal number as AF₁₆
    2 175 = 10 * 16¹ + 15 * 16⁰
    3 = A * 16¹ + F * 16⁰
    4So (175)₁₀ = (AF)₁₆

    Number Systems Representation

    Number SystemBaseSymbols UsedExampleIn Decimal Representation
    Decimal Number System100,1,2,3,4,5,6,7,8,9(175)₁₀
    Binary Number System20,1(10101111)₂(175)₁₀
    Octal Number System80,1,2,3,4,5,6,7(257)₈(175)₁₀
    Hexadecimal Number System160,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F(AF)₁₆(175)₁₀
     

  • Maths
  • Number System
  •  
    ...