Latest update Android YouTube

Number System | Computer Fundamental

Admin
Estimated read time: 21 min

Introduction to Number Systems

A number system is a mathematical notation for representing numbers using digits or symbols in a consistent manner. Different number systems use distinct rules to express values, and the same sequence of symbols can represent different numbers depending on the system. Number systems are broadly classified into two types:

Numebr System | IndianTechnoEra
  • Non-Positional Number Systems: Use symbols where the position does not affect the value.
  • Positional Number Systems: Use digits where the value depends on both the digit and its position.

This chapter explores these systems, their characteristics, and methods for converting between them, with a focus on their relevance to computing.

Non-Positional Number Systems

Characteristics

  • Use symbols like I for 1, II for 2, III for 3, IIII for 4, IIIII for 5, etc.
  • Each symbol represents the same value regardless of its position.
  • The value of a number is determined by adding the symbols.

Difficulties

  • Arithmetic operations (e.g., addition, multiplication) are cumbersome.
  • Large numbers require many symbols, making them impractical for complex calculations.

Positional Number Systems

In positional number systems, the value of a digit depends on:

  • The digit itself.
  • Its position in the number.
  • The base of the number system (the total number of digits available).

The maximum value of a single digit is always one less than the base (e.g., 9 for base 10, 1 for base 2).

Characteristics

  • Use a limited set of symbols called digits.
  • Digits represent different values based on their position.

Decimal Number System

Characteristics

  • Positional system with 10 digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9); base = 10.
  • Maximum digit value is 9 (base - 1).
  • Each position represents a power of 10 (e.g., units, tens, hundreds).
  • Widely used in everyday life.

Example

258610 = (2 × 10³) + (5 × 10²) + (8 × 10¹) + (6 × 10⁰)

= 2000 + 500 + 80 + 6 = 258610

Binary Number System

Characteristics

  • Positional system with 2 digits (0, 1); base = 2.
  • Maximum digit value is 1 (base - 1).
  • Each position represents a power of 2.
  • Fundamental to computers, representing on/off states.

Example

101012 = (1 × 2⁴) + (0 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰)

= 16 + 0 + 4 + 0 + 1 = 2110

Bit (Binary Digit)

A bit is a single binary digit (0 or 1). An n-bit number consists of n binary digits. Bits are the smallest unit of data in computing.

Octal Number System

Characteristics

  • Positional system with 8 digits (0, 1, 2, 3, 4, 5, 6, 7); base = 8.
  • Maximum digit value is 7 (base - 1).
  • Each position represents a power of 8.
  • Three bits (2³ = 8) represent one octal digit in binary.

Example

20578 = (2 × 8³) + (0 × 8²) + (5 × 8¹) + (7 × 8⁰)

= 1024 + 0 + 40 + 7 = 107110

Hexadecimal Number System

Characteristics

  • Positional system with 16 digits (0–9, A–F); base = 16.
  • Letters A, B, C, D, E, F represent decimal values 10, 11, 12, 13, 14, 15.
  • Maximum digit value is 15 (base - 1).
  • Each position represents a power of 16.
  • Four bits (2⁴ = 16) represent one hexadecimal digit in binary.

Example

1AF16 = (1 × 16²) + (A × 16¹) + (F × 16⁰)

= 256 + (10 × 16) + 15 = 256 + 160 + 15 = 43110

Converting Between Number Bases

Another Base to Decimal Base

  1. Determine the positional value of each digit (power of the base).
  2. Multiply each digit by its positional value.
  3. Sum the products.

Example

47068 = (4 × 8³) + (7 × 8²) + (0 × 8¹) + (6 × 8⁰)

= 2048 + 448 + 0 + 6 = 250210

Decimal Base to Another Base (Division-Remainder Method)

  1. Divide the decimal number by the new base.
  2. Record the remainder as the least significant digit.
  3. Divide the quotient by the new base, recording the remainder as the next digit.
  4. Repeat until the quotient is zero; the last remainder is the most significant digit.

Example

95210 to base 8:

DivisionQuotientRemainder
952 ÷ 81190
119 ÷ 8147
14 ÷ 816
1 ÷ 801

Result: 95210 = 16708

Some Base to Another Base

  1. Convert the original number to decimal (base 10).
  2. Convert the decimal number to the new base.

Example

5456 to base 4:

Step 1: 5456 = (5 × 6²) + (4 × 6¹) + (5 × 6⁰) = 180 + 24 + 5 = 20910

Step 2: Convert 20910 to base 4:

DivisionQuotientRemainder
209 ÷ 4521
52 ÷ 4130
13 ÷ 431
3 ÷ 403

Result: 20910 = 31014, so 5456 = 31014

Shortcut Methods

Binary to Octal

  1. Group binary digits into sets of three, starting from the right.
  2. Convert each group to an octal digit.
Example

11010102 = 001|101|010 → 18|58|28 = 1528

Octal to Binary

  1. Convert each octal digit to a 3-bit binary number.
  2. Combine the binary groups.
Example

5628 = 5→101, 6→110, 2→010 = 1011100102

Binary to Hexadecimal

  1. Group binary digits into sets of four, starting from the right.
  2. Convert each group to a hexadecimal digit.
Example

1111012 = 0011|1101 → 316|D16 = 3D16

Hexadecimal to Binary

  1. Convert each hexadecimal digit to a 4-bit binary number.
  2. Combine the binary groups.
Example

2AB16 = 2→0010, A→1010, B→1011 = 0010101010112

Fractional Numbers

Fractional numbers in any base follow the same positional principles as whole numbers, with digits to the right of the point representing negative powers of the base.

General form: anan-1...a0.a-1a-2...a-m

Value: an × bn + ... + a0 × b0 + a-1 × b-1 + ... + a-m × b-m

Binary Fractional Numbers

Example: 110.1012 = (1 × 2²) + (1 × 2¹) + (0 × 2⁰) + (1 × 2⁻¹) + (0 × 2⁻²) + (1 × 2⁻³)

= 4 + 2 + 0 + 0.5 + 0 + 0.125 = 6.62510

Octal Fractional Numbers

Example: 127.548 = (1 × 8²) + (2 × 8¹) + (7 × 8⁰) + (5 × 8⁻¹) + (4 × 8⁻²)

= 64 + 16 + 7 + 0.625 + 0.0625 = 87.687510

Applications of Number Systems in Computing

Number systems are fundamental to computing:

  • Binary: Used in digital circuits, memory, and processor operations, as computers operate on 0s and 1s.
  • Octal: Simplifies binary representation in early computers and Unix file permissions.
  • Hexadecimal: Used in memory dumps, color codes (e.g., #FFFFFF), and programming for compact binary representation.
  • ASCII Code: A character encoding standard using 7 or 8 bits to represent text (e.g., 'A' = 6510 = 4116), enabling computers to process and display text.

Understanding number systems and conversions is crucial for programming, debugging, and hardware design.

Questions

  • What is a number system?
  • How many types of number systems are there?
  • What is a non-positional number system?
  • What are the characteristics of a non-positional number system?
  • What are the difficulties of a non-positional number system?
  • What is a positional number system?
  • What are the characteristics of a positional number system?
  • What are the difficulties of a positional number system?
  • How many types of representations of number systems are there?
  • What is the decimal number system?
  • What is the binary number system?
  • What is the octal number system?
  • What is the hexadecimal number system?
  • What is ASCII code?
  • What is a BIT?
  • What is the full form of BIT?
  • What is a binary digit?
  • What are the characteristics of a binary digit?
  • How do you convert a number's base?
  • How do you convert another number base into decimal base?
  • How do you convert a decimal number base into another base?
  • How do you convert from one base to another base?
  • How do you convert a binary number to its equivalent octal number?
  • How do you convert an octal number to its equivalent binary number?
  • How do you convert a binary number to a hexadecimal number?
  • How do you convert a hexadecimal number to its equivalent binary number?
  • What are fractional numbers?
  • What is the formation of fractional numbers in the binary number system?

2 comments

  1. second ago
    #include

    int main()
    {
    int letter;
    printf("Enter any small letter; \n");
    scanf("%d",&letter);

    switch(letter)
    {
    case 1:
    printf("Averngers. \n");
    break;

    case 2:
    printf("Batsman. \n");
    break;

    case 3:
    printf("chaio. \n");
    break;

    case 4:
    printf("Dum. \n");
    break;
    case 5:
    printf("Ester. \n");
    break;

    case 6:
    printf("Fear. \n");
    break;

    case 7:
    printf("Good Father. \n");
    break;

    case 8:
    printf("Hitman. \n");
    break;
    case 9:
    printf("Iron Man. \n");
    break;

    case 10:
    printf("Jaguarrr. \n");
    break;
    default: printf("Pleas enter the number between 1 to 10!");

    }

    ret…
  2. second ago
    To run java in command prompt

    if you created a java file with name 'Hello.java'
    then follow the given steps:

    1. open cmmand prompt at your existing java file
    2. run 'javac Hello.java'
    3. then run 'java Hello'
Feel free to ask your query...
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.