Sunday, November 19, 2023

NUMBER SYSTEM

NUMBER SYSTEM
The technique to represent and work with numbers is called Number systemDecimal number system is the most common number system. Other popular number systems include binary number system, octal number system, hexadecimal number system, etc.

Binary Number System:- The number system having just these two digits 0 and 1 is called Binary number system. Each binary digit is also called a Bit. Binary number system is also positional value system, where each digit has a value expressed in powers of 2, as displayed here. The binary number system, also known as base-2, is a numeral system that uses only two digits, 0 and 1. It is the most fundamental numeral system used in digital computers and digital systems. In binary, each digit is referred to as a "bit" (a contraction of "binary digit"). The position of each bit in a binary number represents a power of 2. 

Decimal Number System:- The decimal number system, also known as the base-10 system, is the standard system for denoting integer and non-integer numbers. It uses ten digits from 0 to 9 to represent numbers. The position of each digit in a decimal number is a power of 10. The rightmost digit represents the units, the next digit to the left represents tens, then hundreds, and so on. Each digit's value is multiplied by the corresponding power of 10.

Octal Number System:-The octal number system, also known as base-8, is a numeral system that uses eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. It is a positional number system, just like the decimal system (base-10) and binary system (base-2). Each digit in an octal number represents a power of 8.

Octal Numbers System Table

We use only 3 bits to represent Octal Numbers. Each group will have a distinct value between 000 and 111.

Octal Digital Value

Binary Equivalent
0000
1001
2010
3011
4100
5101
6110
7111

Hexadecimal Number System:- The hexadecimal number system, often abbreviated as hex, is a base-16 numeral system. It uses sixteen digits: 0-9 and the letters A-F, where A represents 10, B is 11, C is 12, D is 13, E is 14, and F is 15 in decimal. Hexadecimal is a positional numeral system, similar to the decimal (base-10) and binary (base-2) systems.

Hexadecimal Number System Table

Below is the table of hexadecimal number systems with equivalent values of the binary and decimal number systems.

Decimal Numbers4-bit Binary NumberHexadecimal Number
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F


    CONVERSATION OF NUMBER SYSTEM

Decimal Number System to Other Bases

Earlier we learned about converting other base number systems into a decimal number, Here we will learn how to convert a decimal number into different base numbers. Let us see one by one.

Decimal to Binary

To convert a decimal number into an equivalent binary number we have to divide the original number system by 2 until the quotient is 0, when no more division is possible. The remainder so obtained is counted for the required number in the order of LSB (Least significant bit) to MSB (most significant bit). Let us go through the example.

Example: Convert 2610 into a binary number.

Solution: Given 2610 is a decimal number.

Divide 26 by 2

26/2 = 13 Remainder →0 (MSB)

13/2 = 6 Remainder →1

6/2 = 3 Remainder →0

3/2 = 1 Remainder →1

½ = 0 Remainder →1 (LSB)

Hence, the equivalent binary number is (11010)2

Decimal to Octal

Here the decimal number is required to be divided by 8 until the quotient is 0. Then, in the same way, we count the remainder from LSB to MSB to get the equivalent octal number.

Example: Convert 6510 into an octal number.

Solution: Given 6510 is a decimal number.

Divide by 8

65/8 = 8 Remainder →1 (MSB)

8/8 = 1 Remainder →0

⅛ = 0 Remainder →1 (LSB)

Hence, the equivalent octal number is (101)8

Decimal to Hexadecimal

The given decimal number here is divided by 16 to get the equivalent hex. The division of the number continues until we get the quotient 0.

Example: Convert 12710 to a hexadecimal number.

Solution: Given 12710 is a decimal number.

Divide by 16

127/16 = 7 Remainder →15

7/16 = 0 Remainder → 7

In the hexadecimal number system, alphabet F is considered as 15.

Hence, 12710 is equivalent to 7F16


Binary Conversion 

Binary to Decimal Conversion Steps

  • First, write the given binary number and count the powers of 2 from right to left (powers starting from 0)
  • Now, write each binary digit (right to left) with the corresponding powers of 2 from (right to left), such that first binary digit (MSB) will be multiplied with the greatest power of 2.
  • Add all the products in the above step
  • The final answer will be the required decimal number

Let us understand this conversion with the help of an example.

Example of Binary to Decimal Conversion:

Convert the binary number (1101)2 into a decimal number.

Solution:

Given binary number = (1101)2

Now, multiplying each digit from MSB to LSB with reducing the power of the base number 2.

1 × 23 + 1 × 2+ 0 × 21 + 1 × 20

= 8 + 4 + 0 + 1

= 13

Thus, the equivalent decimal number for the given binary number (1101)2 is (13)10


Conversion from Binary to Octal

In number system, you will come across different types of numbers such as binary, octal, decimal and hexadecimal. To convert binary numbers to octal numbers, follow the below steps:
Take the given binary number
  1. Multiply each digit by 2n-1 where n is the position of the digit from the decimal
  2. The resultant is the equivalent decimal number for the given binary number
  3. Divide the decimal number by 8
  4. Note the remainder
  5. Continue the above two steps with the quotient till the quotient is zero
  6. Write the remainder in the reverse order
  7. The resultant is the required octal number for the given binary number

Binary to Hex Conversion

A binary number has base 2 and consist of only two digits, that are 0 and 1. It has a major use in computer applications.

Hexadecimal numbers are represented by base 16. It uses 0 to 9 digits and for higher numbers, it is represented by English alphabets such as A,B,C,D,E and F.

To convert binary number to hexadecimal is an easy method. We have to group the given binary number in pair of 4 and then find the equivalent hexadecimal number from the below table.

Binary Arithmetic

Binary mathematics refers to mathematical operations performed using the binary number system, which is a base-2 numeral system. In the binary system, numbers are expressed using only the digits 0 and 1. Each digit in a binary number is called a "bit".
Here are some basic concepts and operations in binary mathematics: Binary numbers are made up of only two digits: 0 and 1. In the binary number system, no other numbers can be used except 1 and 0.
1. Binary Addition:
The addition table in binary is as follows
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 (move 1 to the next column)
2. Binary Subtraction:
Similar to decimal subtraction but with the rules of borrowing. The subtraction table in binary is as follows:
0 – 0= 0
1 - 0 = 1
1 - 1 = 0
0 - 1 = 1 (borrow 1 from the next column)
3. Binary Multiplication:
Similar to decimal multiplication but involves multiplying by 0 or 1. The multiplication table in binary is simpler than that in decimal. The rules of binary multiplication are as follows.
0 X 0 = 0
0 X 1 = 0
1 X 0 = 0
1 X 1 = 1
4. Binary Division:
The rules of binary division are as follows.
0 ÷ 0 = undefined
0 ÷ 1 = 0
1 ÷ 0 = undefined
1 ÷ 1 = 1


No comments:

Post a Comment

IX पाठ 1 (Q/A)

कंप्यूटर और विकास का परिचय(Q/A) दीर्घ उत्तरीय प्रकार के प्रश्न 1. कंप्यूटर क्या है? इसकी प्रमुख विशेषताओं का वर्णन करें। उत्तर:- कंप्यूटर ए...