CH-1 book
CH-1 book
You use numbers to perform different calculations. To make calculations easy, different number
systems were invented. A number system is amathematical way to represent numbers. There
are primarily four types of number systems-Decimal, Binary, Octal, and Hexadecima.
As you can see, the number 38.12 contains a decimal point that separates the whole
number into two parts. Hence, you can expand it as:
Number Power of base Calculation Value
2 2 x 102 2 x 1/100 0.02
1 1x 10-! 1 x 1/10 0.1
8 x 100 8 x 1 8
3 3 x 10' 3 x 10 30
Example:
Binary number 1
Positional value 2° 2 2' 20
Any data or instructions entered in a computer is converted into binary form because a
computer understands only machine language. A machine language consists of binary digits.
The binary digit 1 means CON and the binary digit 0 means OFF.
Allthe other numbers can be expressed by combining these digits and letters. The
hexadecimal number system is used mostly in microprocessors and microcontrollers.
-el-lelll
2
2
51
25
12 Write the rermainders in reverse
2 6 order to get a binary number
2 3
2
2 0
Let us understand binary addition with the help of the following examples:
Example 1: Add (11101), and (1 1011),.
Solution:
1 1 1 1 1 Carry over
11 1
1 1
1 1
Explanation: The detailed calculation of Example 1 starts from the digits at the units position.
1+1= 10 = 0 with a carry over of 1.
1+0 + 1= 10 = 0 witha carry over of 1.
1+ 1+ 0= 0 with 1carry + 0 = 10 + 0=0 with a carry over of 1.
1 +1 + 1 =0 with 1carry + 1= 10 + 1 =lwith a carry over of 1.
1+ 1+ |=0 with 1carry + 1= 10+ 1= 1with a carry over of 1.
Thus, (11101), + (11011), = (11100),
Example 2: Add (1000), and (101),. Example 3: Add (1010), and (111),
Solution: Solution: 1 1 1 Carry over
10 0 0 101
+
1 0 1 11 1 13
= | 10 1 = 1 00 0 1
Binary Subtraction
1and 0. The subtraction of
Binary subtraction includes the subtraction of only two digits, i.e.
the binary digits depends on the following four basic combinations:
A B A - B =C BorroW
0-0 = 0 No borrow Ava's Cool Tip >>>>
1 0 1- 0 = 1 No borrow Like decimal subtraction, the number is
borrowed from the next position when 1
No borrow is subtracted from 0 (10 -l= 1),
0-1 = 1 Borrow 1
10-1
40
0 1
Explanation: The detailed calculation of the above example starts from the digits at the units
position.
0-0 = 0
0-1 = 1, borrow l and then it becomes, 10 1 = 1.
Now for l 0, 1has already been given, hence, it becomes 0 - 0= 0. Now, 1 -1 =0
Thus, (1100), - (1010), = (0010),
Example 2: Subtract (1010), from (1111),.
Solution: 1 1 1 1
1 1
0 1
Flashback
The base of decimal numbers is 10 because the total digits in this
number system are ten (0-9).
The binary number system consists of only two numbers-0 and 1. The base of this
number
system is 2.
The octal number system consists of 8 digits. The base of this number system is 8.
The hexadecimal number system includes 16 elements-0 to 9 and A to E The letters A to F
represent 10, 11, 12, 13, 14, 15, respectively.
The division method is used to convert decimal numbers into binary numbers.
The multiplication method is used to convert binary numbers into decimal numbers.
Exercises
A. Tick () the correct answers.
16
4. Distinguish between octal and hexadecimal number systems.
Solution:
17