100% found this document useful (1 vote)
19 views48 pages

Number Systems

Uploaded by

Idk Lol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
19 views48 pages

Number Systems

Uploaded by

Idk Lol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Number systems

PAPER II
By Ankita Bagade
The various number Systems are:Decimal
system,binary system,hexadecimal system and octal
system.
Radix for decimal system is10.
binary system is 2 .
hexadecimal system is16.
octal system is 8.
Radix is defined as number of numerals in the system.
It is also known as base or exponent .
The numbers in decimal system
are 0,1,2,3,4,5,6,7,8,9. The
numbers in binary system are 0,1.
The numbers in Hexadecimal
system are
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
The numbers in octal system are
0,1,2,3,4,5,6,7,
How to convert a decimal number into
binary equivalent? The method is called
double dabble method. The decimal
number is repeated divided by 2.
Example: (4) is decimal to be converted
into binary. 4/2= 2 ( quotient), 0(
remainder ). 2/2=1( quotient),
0(remainder). The answer is 100 in binary
system. Now try converting ( 6) decimal
number into binary equivalent
To convert(6)10= ( )2 Divide 6 by 2.
/6/2 = quotient(3) Remainder((0 )
3/2 = quotient (1). Remainder(1)
Answer=(110)
Convert(25)10=(. )2
25/2=. quotient(12). Remainder(1)
12/2 = quotient (6). Remainder(0)
6/2. =. Quotient(3). Remainder(0)
3/2. =. Quotient(1) Remainder(1 ) Ans 11001
Convert (16)10=( )2
Divide16/2
16/2 =quotient(8). Remainder(0)
8/2. =quotient(4). Remainder(0)
4/2. =quotient(2). Remainder(0)
2/2. =quotient(1). Remainder(0)
Answer= 10000
How to convert binary number into the
decimal number. You must write the
values of 20=1,
21=2,22=4,23=8,24=16,25=32,26=64,27=
128 and so on.
Binary number 100 = 1*22+0*21 +0*20
=4+0+0=4.
Convert. (110)2=(. )10
1*4+1*2+0*1=4+2+0=6
Answer 6
Convert(11001)2=(. )10
1*16+1*8+0*4+0*2+1*1=16+8+0+0+1=25
Answer=25.
Convert(10000)2=(. )
10
Answer=1*16+0*8+0*4+0*2+0*1=16
The
Decimal number can be converted into
Hexadecimal.To convert Decimal number into
Hexadecimal number ,we use Hexadabble method
In this method the decimal number is divided by
16 Note down the quotient and remainders.
example: (2056)10=( )16 now divide 2056 by16.
2056/16 = quotient(128) Remainder(8)
128/16= quotient(8). Remainder(0).
Answer=(808)16
Convert (4566)10=(. )16

4566/16 =quotient(285). Remainder(6)

285/16. =quotient (17). Remainder(13)

17/16. = quotient(1). Remainder(1)

Remember in hexadecimal system 13 is denoted by D

Answer =(11D6)16
Convert. (3076)10= (. )16

3076/16 =. Quotient(192). Remainder(4)

192/16. =. Quotient(12). Remainder (0)

Remember in Hexadecimal system 12 is denoted by


C

Answer =(C04)16
How to convert Hexadecimal into decimal system.
Write the weight age of 16 .powers of 16. 160=1. 161=16.
162=256. 163=4096. 164=65536.

Convert (808)16=(. )10

8. 0. 8
162 161. 160

=8*256 +0* 16+ 8 *1


=2048+0+8
=(2056)10
Convert (11D6)16=(. )10

1. 1 D. 6

163. 162. 161. 160

=4096*1. +256*1 +13*16+1*6


=4096 +256+208+6
=(4566)10
Convert (C04)16=(. )10

C. 0. 4

162. 161. 160

=256*12. +0*16. +4*1

=3072 + 0 +4
=(3076)10
The different codes used in computer system are ASCII code,EBCD code.
ASCII code = American Standard Code For Information Interchange code.
It is 7 bit code
EBCD code = Extended Binary coded decimal code. It is 8 bit code
BCD Code. =. Binary Coded Decimal. It is 4 bit code
BCD(Binary codedDecimal) is also known as
8421 code
Decimal number. 2 3. 2 2. 21. 20
0. 0. 0. 0. 0
1. 0. 0. 0. 1
2. 0. 0. 1. 0
3. 0. 0. 1. 1
4. 0. 1. 0. 0
5. 0. 1. 0. 1
6. 0. 1. 1. 0
7. 0. 1. 1. 1
8. 1. 0. 0. 0
9. 1. 0. 0. 1
Remember 20=1, 21=2, 22= 4, 23=8.
Binary coded decimal is also known as BCD code or 8421
code.
Decimal number 2= 0010 in binary.

8. 4. 2. 1

0. 0. 1. 0

8*0 +4*0+2*1+1*0
=0+0+2+0
2
8. 4. 2. 1
0. 0. 1. 1. =. 3
0. 1. 0. 0. =. 4
0. 1. 0. 1. =. 5
0. 1. 1. 0. =. 6
0. 1. 1. 1. =. 7
1. 1 0. 0. 0. =. 8
2. 1. 0. 0. 1. =. 9
3. 1. 0. 1. 0. =. A(10)
4. 1. 0. 1. 1. =. B(11)
5. 1. 1 0 0. =. C(12)
6. 1. 1. 0 1 =. D(13)
7. 1. 1. 1. 0. =. E(14)
8. 1. 1. 1. 1. =. F(15)
Convert the Hexadecimal into binary equivalent

(2056)16= (. )2

2 = 0010
0 = 0000
5 = 0101
6.= 0110
Answer=. ( 0010. 0000. 0101. 0110)2
Convert Hexadecimal number(C04)16=(. )2
C= 12 = 1100
0 = 0000
4. = 0100
Answer = ( 1100 0000 0100)2

Convert Hexadecimal number (11D6)16 = (. )2


1 = 0001
1 = 0001
D = 13 = 1101
6 = 0110. Answer= ( 0001 0001 1101 0110)2
Convert Decimal number into its Octal equivalent.
Divide the decimal number by 8 till you get quotient less
than 8.
(678)10=(. )8

678/8 = quotient 84. Remainder. 6

84/8. = quotient. 10. Remainder 4

10/8. = quotient. 1. Remainder. 2

Answer=. (1246)8
Convert Decimal number (754)10=(. )8

754/8. =quotient 94. Remainder. 2

94/8. =. Quotient 11. Remainder 6

11/8. =. Quotient 1. Remainder. 3


Answer= (1362)8
Convert decimal number (555)10=(. )8
555/8. =. Quotient 69. Remainder 3
69/8. =. Quotient 8. Remainder 5
8/8. =. Quotient 1. Remainder 0
Answer =. (1053)8
Convert the Octal number into Decimal equivalant, we must
write the powers of 8. 80=1. 81=8. 82=64. 83=512. 84=4096
And so on

Convert (1246)8=(. )10

8 3. 8 2. 8 1. 80
1. 1. 2. 4. 6

512*1 +64*2. +. 8*4. +1*6


(678)10
Convert octal number(1352)8=(. )10

8 3. 8 2. 8 1. 80

1. 1. 3. 5. 2

512* 1+. 64*3. +8*5. +1*2


512+192.+40+2
(746)10
Convert Octal number. (1053)8=(. )10
8 3. 82. 81. 80
1. 1. 0. 5. 3
512*1. +. 64*0. +5*8. +1*3

512 +0+ 40. +3


(555)10

Convert (1362)8=(. )10

512*1+3*64 +6*8. +2*1


512 +192 +48 +2
(754)10
Binary Addition Laws

0+0 =. 0.
0+1.=. 1
1+0 =. 1
1+1 = (10)2= (2)10
1+1+1=(11)2=(3)10
1+1+1+1=(100)2=(4)10
And so on…
When we add two numbers we get sum and carry.
27+7= 34 in decimal number. Here 7+7=14. 4 is called sum.
1 is called carry. 1+2=3.
Add the binary numbers 10110+10011

1
10110
+1 0 0 1 1
_________
1 01 0 0 1

Answer=. Carry.= 1. Sum= 01001


Add the binary numbers 11001+ 10110
11001
+1 0 1 1 0
————
1 01 1 1 1
Answer : carry= 1. Sum= 01111
Add the binary numbers. 111001+101110
111001
+1 0 1 1 1 0
—————
1 1 0 0 1 1 1.
Answer: carry=1,Sum 100111
Binary Subtraction

0-0=0
1-0=1
1 - 1 =.0
0 - 1 = 1(borrow). 0(difference)

Subtractor. 23
Subtrand. 16
——
07
Borrow( 1). Difference( 07)
What is meant by 1’s compliment of binary number ?
1’s compliment of binary number is obtained by replacing
binary bit 0 with binary bit 1 and binary bit 1 with binary bit 0

Binary number: 10110


1’s compliment: 01001

Binary number: 11001


1’s compliment: 00110
Binary number: 101010
1’s compliment: 010101
Subtract binary number (1100- 1010) using 1’s compliment.
Subtractor: 1100
Subtrand: 1010
Find 1’s compliment of Subtrand: 1010
0101
Now add Subtractor and 1’s compliment of Subtrand
1100
+0101
———
10001
Carry =1 Sum= 0001.The binary number is positive.
0001+1=0010: Answer
Subtract (1010)2-(1100)2using 1’s compliment method

Subtractor (1010)
Subtrand(1100)
1’scompliment of subtrand= 0011
Add Subtractor 1010
+0011
———
01101
Carry =0 sum=1101The number is negative and 1’s
compliment form.
Subtract (1101)-(1001) using 1’s compliment method.
Subtractor(1101)
Subtrand(1001)
1’scompliment of subtrand= 0110
Add Subtractor 1101
+0110
——–
1 0011
Carry=1 sum=0011
There is carry =1. The answer is positive binary number
0011+ 1=0100
Subtract(1001)-(1101) using 1’s compliment method
Subtractor(1001)
Subtrand(1101)
1’scompliment of subtrand 0010
Add Subtractor 1001
+0010
——
1011
There is no carry.The binary number is negative and is in its 1’s
compliment form
Find the 2’s compliment of binary number 1001
Binary number 1001

1’s compliment of binary number 0110


Add binary bit. +. 1
————
0111. = Answer
Find the 2’s compliment of binary number 1110
Binary number 1110
1’s compliment of binary number. 0001
Add binary bit. +. 1
———-
0010. = Answer
Find the 2’s compliment of binary number 10011
Binary number 10011
1’scompliment. 01100
Add. +. 1
———-
01101 = Answer
Find the 2’s compliment of binary number 1100011
Binary number 1100011
1’scompliment 0011100
Add. +. 1
————-
0011101 = Answer
Subtract (0101)-(1010) using 2’s compliment method
Subtractor(0101)-subtrand(1010)
Now find 1’s compliment of subtrand=0101
Add binary bit. +. 1
———
0110
Add subtractor to 2’s compliment of subtrand.
0101
+0110
——
0 1011
Carry=0, Sum =01011 Answer is negative number and in 2’s
compliment form
Subtract (1100)-(1010) using 2’s compliment method
Subtractor(1100)-subtrand(1010)
Now find 1’s compliment of subtrand=0101
Add binary bit. +. 1
———
0110
Add subtractor to 2’s compliment of subtrand.
1100
+0110
——
10010
Carry=1, Sum =0010 Answer is positive number 0010
Subtract (1010)-(0101) using 2’s compliment method
Subtractor(1010)-subtrand(0101)
Now find 1’s compliment of subtrand=1010
Add binary bit. +. 1
———
1011
Add subtractor to 2’s compliment of subtrand.
1010
+1011
——
10101
Carry=1, Sum =0101 Answer is positive number 0101
Subtract (1000)-(0101) using 2’s compliment method
Subtractor(1000)-subtrand(0101)
Now find 1’s compliment of subtrand=1010
Add binary bit. +. 1
———
1011
Add subtractor to 2’s compliment of subtrand.
1000
+1011
——
10011
Carry=1, Sum =0011 Answer is positive number 0011
Subtract (0101)-(1000) using 2’s compliment method
Subtractor(0101)-subtrand(1000)
Now find 1’s compliment of subtrand=0111
Add binary bit. +. 1
———
1000
Add subtractor to 2’s compliment of subtrand.
0101
+1000
——
01101
Carry=0, Sum =1101 Answer is negative numbers do in 2’s
compliment form.
Subtract (1010)-(1100) using 2’s compliment method
Subtractor(1010)-subtrand(1100)
Now find 1’s compliment of subtrand=0011
Add binary bit. +. 1
———
0100
Add subtractor to 2’s compliment of subtrand.
1010
+0100
——
01110
Carry=0, Sum =01110 Answer is negative number and in 2’s
compliment form
Binary Multiplication

0*0 = 0
0*1 =0
1*0= 0
1*1=1

Multiply 0001*1001
1001
*0001
——-
1001 = Answer
Multiply 1100*10
1100
*10
———
0000
+1100
11000 =Answer
Multiply 1101*100

1101
*100
——-
0000
0000
1101
———-
110100. = Answer
Convert the decimal number(0.24) into binary equivalent

0.24* 2 = 0.48. 0
0.48*2. = 0.96. 0
0.96*2. = 1.92. 1
0.92*2. = 1.84. 1
Answer=. (0.0011)

Convert the decimal number( 0.5) into binary equivalent


0.5*2. = 1.0. 1
0.0*2. =. 0.0. 0
Answer = ( 0.10)
Convert the decimal number(4.5) into binary equivalent
4/2. = 2. 0
2/2. = 1. 0
(4)10. = (100)2

(0.5)*2. = 1.0. 1
(0.0)*2. = 0.0. 0
(0.5)10. = (0.10)2

Answer= (4.5)10 = (100.10)2


Convert decimal number (6.25)10 into binary equivalent

(6)/2. =. 3. 0
3/2. =. 1. 1
(6)10. = (110)2

(0.25)*2. = 0.50. 0
0.5*2. = 1.0. 1
0.0*2. = 0.0. 0
(.25)10. = (0.010)2
Answer. =(110.01)2
Convert the decimal number (3.3)10 into its binary equivalent

(3)/2. = 1. 1
(3)10. = (11)2

(0.3)*2= 0.6. 0
0.6*2. =1.2. 1
0.2*2. = 0.4. 0
Answer = (11.010)2

You might also like