Contents
The study of Physics Topics can help us understand and solve real-world problems, from climate change to medical imaging technology.
On What Factors Does the Value of a Number Depend?
The voltage or current signals passed through some traditional electronic circuits—like a rectifier made of p-n junction diode or an amplifier made of transistor—can be varied continuously within a definite range. For example, in the CE mode of a transistor circuit, input voltage can be varied continuously from 0 V up to 6 V or 10 V. This kind of signal is called analogue signal and the corresponding electronic circuit is called analogue circuit.
On the other hand, in case of ultra-modern electronic equipmentš like calculator, computer, etc., there are two discrete states of the input or output signal—low and high. In this case, the correct value of the voltage or current signal is not important at all. For example, if the magnitude of an input or output voltage lies in the range of 0 V to 0.5 V, it can be considered ‘as low voltage and if it lies between 4 V and 5 V, it can be considered as high voltage. In this case, the circuit is so designed that the value of the voltage never lies in the range of 0.5 V to 4 V.
If the input and output signals of an electronic circuit have two discrete states, then these two states can be denoted by two symbols, the most convenient being two digits. This kind of signal is called a digital signal and the circuit thus formed is called a digital circuit. The usage of this circuit is easier compared to that of an analogue circuit. The accuracy of the input and output signals is rather unimportant. The time gap between the application of input and obtaining the output is very small and the efficiency of this circuit is very high. For these reasons digital circuits are widely used nowadays.
To indicate the two discrete states of digital signals, the two digits mostly used are 0 and 1. 0 is used for low value and 1 is used for high value. Such use of the digits is called positive logic. In the above example, 0 is used as the symbol of the voltage from 0 V to 0.5 V and 1 is used as the symbol of the voltage from 4 V to 5 V. On the other hand, in case of less-used negative logic, 1 is used to denote a low value and 0 is used to denote a high value.
In different types of analogue and digital signals, a typical analogue and digital signals are shown in Fig(a) and Fig(b) respectively. Here for analogue signal, formation of wave i.e., actual form of time varying voltage is most important.
On the other hand, in case of digital signal, waveforms are always rectangular in shape, i.e., the interval of time in which the voltage is in lower or higher state, is important. Thus the accuracy of digital signal does not depend on the range or two discrete values of voltage in higher and lower states.
Binary Number System
By a number, we usually mean a number in the decimal system. 10 digits-0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are used in decimal system. Although in daily life decimal system is widely used. Computer circuits are fabricated by using a new system called binary
number system which consists of two digits 0 and 1.
Definition: The system of expressing all the real numbers by the two digits 0 and 1 is called the binary system.
The value of any number depends on the two factors—
- the magnitude and position of the digits by which any number is formed and
- the base or radix of the number system. The base or radix of a number system refers to the number of digits used in the system. For example, bases of the decimal and binary systems are 10 and 2 respectively.
A number formed in a system is expressed by the symbol (number)base. For example, the number 257 formed in the decimal system is written as (257)0. In the similar way, the number 1101 formed in the binary system is written as (1101)2. Clearly, the two numbers (11)10 and (11)2 are not the same; the first number is eleven and the second one is three.
Integers in Decimal and Binary Systems
Decimal system: Let us consider a four digit integer 2795 in the decimal system. The number is expressed in words as two thousand seven hundred ninety five. In this case the places of the digits are given in the following table.
We can determine the value of this number from these places and from the base of the number system in the following way.
Place of a digit indicates the significance of the digit. The digit lying at the extreme left side of a number has the greatest significance and the digit at the extreme right has the least significance. In this case, the digit 2 has the greatest significance and hence 2 is the most significant digit. The digit 5 has the least significance and hence 5 is the least significant digit.
Binary system: Let us consider a four digit integral number 1101 in the binary system. In this case, the places of the digits are given in the following table:
We can determain the value of this number in the following way:
For better understanding, see the following table:
In the given number, the digit 1 in the place of 8 is the most significant digit and the digit 1 in the place of 1 is the least significant digit.
Fractions in Decimal and Binary Systems
Decimal system: A fraction in decimal system is written by a decimal sign (.) and placing some digits right side of this sign. Such as .417. In this case, the places of the digits are given in the following table.
The method of determining the value of the number is illustrated below with 0. 417 as an example:
For better table understanding see the following table:
In case of a fraction, the digit next to the decimal point is the most significant digit and the digit at the extreme right is the least significant digit. In this case, the digit 4 lying in the one-tenths place is the most significant digit and the digit 7 lying in the one-thousandths place is the least significant digit.
Binary system: Let us consider a fraction 0.1011 in the binary system. In this case, positions of the digits are:
The value of the number can be determined with the help of these places and the base of the number system as shown below:
For better understanding see the following table:
In the given fraction, the digit 1 in the place of \(\frac{1}{2}\) is the most significant digit and the digit 1 in the place of \(\frac{1}{16}\) is the least
significant digit.
Binary to Decimal Conversion
The determination of decimal value of any binary number was discussed in the previous section. Some examples of the conversion of binary to decimal numbers are given below:
i) (10111)2
= (1 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (1 × 20)
= 16 + 0 + 4 + 2 + 1 = (23)10
ii) (10.111)2
= (1 × 21) + (0 × 20) + (1 × 2-1) + (1 × 2-2) + (1 × 2-3)
= 2 + 0 + 0.5 + 0.25 + 0.125 = (2.875)10
iii) (0.001)2 = (0 × 20) + (0 × 2-1) + (0 × 2-2) + (1 × 2-3)
= 0 + 0 + 0 + 0.125 = (0.125)
iv) (1.001)2 = (1 × 20) + (o × 2-1) + (o × 2-2) + (1 × 2-3)
= 1 + 0 + 0 + 0.125 = (1.125)10
Decimal to Binary Conversion
For better understanding, in case of conversion of decimal to binary it is necessary to discuss about integer and fraction seperately.
Conversion of integers: Starting from 20, the ascending powers of 2 are 20, 21, 22, 23, … . Multiplying 0 or 1 with these numbers (i.e., 20, 21,…..) and then adding the products, any integer can be expressed. For example,
44 = (25 × 1) + (24 × 0) + (23 ×1) + (22 × 1) + (21 × 0) + (20 × 0)
45 = (25 × 1) + (24 × 0) + (23 × 1) + (22 × 1) + (21 × 0) + (20 × 1)
46 = (25 × 1) + (24 × 0) + (23 × 1) + (22 × 1) + (21 × 1) + (20 × 0)
47 = (25 × 1) + (24 × 0) + (23 × 1) + (22 × 1) + (21 × 1) + (20 × 1)
If we place those 0s and is in order of their multiplication with the power of 2 to express the decimal number, the binary form of that decimal number can be easily expressed.
So, (44)10 = (101100)2 (45)10 = (101101)2
(46)10 = (101110)2 (47)10 = (101111)2
The process in which decimal numbers are converted into their respective binary numbers as discussed above, is not a correct mathematical process, because these calculations are done orally. The proper method for conversion is to go on dividing the number and the successive quotients by 2 continuously, writing the remainder in each division till the quotient is zero. Arranging the remainders from bottom to top, i.e., from left side to right side, we get the given number in binary system. Two examples are given below:
i) Determination of the binary form of (44)10:
ii) Determination of the binary form of (45)10:
Conversion of fraction: Starting from 2-1, the descending powers of 2 are 2-1, 2-2, 2-3, …… . All fractions can
not be expressed by multiplying 0 or 1 with these numbers (i.e. 2-1, 2-2, ……) and then adding the products. For example, 0.125 = (2-1 × 0) + (2-2 × 0) + (2-3 × 1) , but 0.12 cannot be expressed by this way.
At first, any decimal fraction has to be multiplied by 2. After multiplying, if the value of the fraction becomes less than 1, then write 0 and if greater than 1, then write 1. Put binary point on the left side of 0 or 1. Now, if the value of fraction is less than 1 then this number has to be multiplied by 2 again and if the value of fraction is greater than 1 then except integer the remaining part has to be multiplied by 2.
Similarly, if this product value is less than 1 , write 0 otherwise write 1. This 0 or 1 has to be written right side of 0 or 1 written before. In this way, the fractional part of the product value has to be multiplied by 2 again and again. According to this value write 0 or 1 until the product value becomes 1. But for most of the cases, the product value is never equal to 1. In that case, the given decimal fraction cannot be expressed by binary fraction of same value. This method of conversion of a fraction from decimal to its corresponding binary form is best understood by following examples:
i) Determination of the binary form of 0.5625:
ii) Determination of the binary form of 0.3:
In this case we see that, the product can never be equal to 1 and the part 1001 repeats again and again. So, 0.3 cannot be expressed in a binary fraction of exact value. Since the part 1001 repeats itself in the fraction 0.010011001 … ,it can be written as (0.0)(1001)2
∴ (0.3)10 = (0.0) (1001)2
It should be mentioned here that in case of any calculation, only those significant digits after the point are considered, which are required for the calculation. For example, If you require eight significant digits after the point for a calculation, you should write,
(0.3)10 = (0.01001100)2
The integral and the fractional part of any decimal number are converted separately into their corresponding binary values to express the number.
For examples,
(44)10 = (101100)2 and (0.5625)1o = (0.1001)2
∴ (44.5625)10 = (101100.1001)2
Addition, Subtraction, Multiplication and Division of Binary Numbers: The process of addition, subtraction, multiplication and division are similar for both decimal and binary systems. Only difference between binary and decimal number is, in decimal system, numbers of digit are 10 (0, 1, 2, ……, 9) whereas in binary system, numbers of digit are 2(0 and 1).
Binary Addition: Rule of addition-
0 + 0 = 0, 0 + 1 = 1 + 0 = 1, 1 + 1 = 10
The last equation, 1 + 1 = 10 shows that, in a column the sum of two binary 1 gives O in that column with a carry of 1 in left column.
Example 1:
- In the first column (from right), the binary sum of 1 and 1 gives 0 in that column with a carry of 1 in left column (second column from right).
- In the second column (from right), the carry of 1 from first column is added to the sum of 1 and 0, gives o in that column with a carry of 1 in the third column (from right).
- In third column, the carry of 1 from second column is added to the sum of 1 and 1, gives 11 in that column as there is no column in left.
Example 2:
- In the first column (from right), the binary sum of 1, 1, 0, 1 and 0 gives 1 in that column with a carry of 1 in left column (second column from right).
- In the second column, the carry of 1 from first column is added to the sum of 0, 1, 1 and 1, gives 0 in that column with a carry of 10 in the third column from right.
- In third column, the carry of 10 from second column is added to the sum of 1 and 1, gives 100 in that column as there is no column in left.
Binary Subtraction: Rule of subtraction-
0 – 0 = 0,
1 – 0 = 1,
1 – 1 = 0,
10 – 1 = 1
The first three are the same as In decimal. The fourth rule is the only new one. It applies in the borrow case when the top digit in a column is 0 and the bottom digit is 1. (Remember: In binary, 10 is pronounced as ‘one-zero’ or ‘two.)
The procedure of binary subtraction is shown with an example in the table below: (After alignment of the numbers, subtraction proceeds from right to left).
* Read marks indicate borrowing
To subtract a large number from a small number, we subtract the small number from the large number and put a minus (-), sign before the result. Thus to subtract 11111 from 11001, we subtract the second number from the first number:
Binary multiplication and division: Rule of multiplication—
0 × 0 = 0, 1 × 0 = 0 × 1 = 0, 1 × 1 = 1
The process of binary multiplication Is same as decimal multiplication.
It should be mentioned here that in calculator and computer, multiplication and division are the same as repeated binary addition and subtraction. Hence in application, binary multiplication and division have no importance.
Numerical Examples
Example 1.
Write the decimal equivalent of (101101)2. [WBCHSE Sample Question]
Solution:
(101101)2 = 1 × 25 + 0 × 24 + 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20
= 32 + 0 + 8 + 4 + 0 + 1 = (45)10
Example 2.
Addition:
i) (1100.101)2 + (100.11)2 + (11.01)2
ii) (1000001)2 + (11111)2
Solution:
i)
ii)
Example 3.
Subtraction:
i) (1100.101)2 – (1001.11)2
ii) (1000001)2 – (11111)2
Solution:
i)
ii)