Unit-1 Number System
Unit-1 Number System
System
Number System
When we type some letters or words, the computer translates them
in binary numbers as computers can understand only binary
numbers.
Decimal number system has base 10 as it uses 10 digits from
0 to 9. In decimal number system, the successive positions to the left
of the decimal point represent units, tens, hundreds, thousands and
so on.
A value of each digit in a number can be determined using
The digit
Symbol value (is the digit value 0 to 9)
The position of the digit in the number
Increasing Power of the base (i.e. 10) occupying successive positions
moving to the left
Example
9 1 9*101 = 90
101
5 2 5*102 = 500
592
102
Binary number system
1 0 20 1*0 = 1
1 1 21 1*2 = 2
0 2 22 0*4 = 0
0 3 23 0*8 = 0
1 4 24 1*16= 16
1 5 25 1*32= 32
51
Cont…
Direct Method
Double Dabble Method
Direct Method
Binary Number Positional operation
value
11100101
1 1*20 1
0 0*21 0
1 1*22 4
0 0*23 0
0 0*24 0
1 1*25 32
1 1*26 64
6+ 0 1
6 1
12+ 1
13
(1101)2= (13)10
Example
= 0.6875
Questions
=448 16 1
465
(721)8= (465)10
Ques: Convert the octal 131 to its equivalent
decimal number
ans: 89
Hexadecimal
0 0000 8 1000
1 0001 9 1001
2 0010 A 1010
3 0011 B 1011
4 0100 C 1100
5 0101 D 1101
6 0110 E 1110
7 0111 F 1111
Convert binary to
Hexadecimal
Divide the given binary number into groups of 4 bits
each(from right to left).
Replace each group by its hexadecimal Equivalent.
Questions:
1. Convert (101111100001)2 into its hexadecimal.
Ans: (BEI)16.
2. Convert (10101111.0010111)2 into its hexadecimal.
Ans: (AF.2E)16
Convert Decimal to
Hexadecimal
Divide the number by 16.
Write the dividend under the number. This
become the new number.
Write the remainder at the right in a column.
Repeat steps 1 to 3 until a ‘0’ is produced as a
new number.
Question: Convert the Decimal 87 to
hexadecimal number.
(87)10= (57)16
Convert hexadecimal to
Decimal
Write out the Hexadecimal digits as power of
16.
Convert each power of 16 into its decimal
equivalent term.
Add these terms to produce the required
decimal number.
Question: (A2D)16=(2605)10
Data Representation
Sig
n magnitude
bit
1 0 0 0 0 0 0 0
(-0)10
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
Signed 2’s Compliment
The 2’s Compliment of a binary number is obtained by
adding 1 to 1’s Compliment.
Example: (+12)10= 1100
0 0 0 0 1 1 0 0
1 1 1 1 0 0 1 1 1’s
11110011 1’s Compliment
1
11110100 2,s Compliment
1Therefore,
1 Positive
1 integer
1 2’s compliment
0 1 is the 0 integer(-12)10
0 negative
Question
Mantissa exponent
0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 1
Question
0 111000100 0 00100
M e