SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
Basic Electronics Notes

Number system

UNIT-VII
Syllabus
1. NUMBER SYSTEMS: Introduction, decimal system, Binary, Octal and Hexadecimal
number systems, addition and subtraction, fractional number, Binary Coded Decimal
numbers.
NUMBER SYSTEM
The human need to count things goes back to the dawn of civilization. To answer the
questions like how much or how many‖, people invented number system. A number system is
any scheme used to count things. The decimal number system succeeded because very large
numbers can be expressed using relatively short series of easily memorized numerals. Decimal or
base 10 number system‘s origin: can be traced to, counting on the fingers with digits. In any
number system, the important term is Base or radix
Base: Base is the number of different digits or symbols or numerals used to represent the number
system including zero in the number system. It is also called the radix of the number system.
Commonly used number systems :
1. Decimal
2. Binary
3. Octal
4. Hexadecimal.
Decimal number system :
The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4,
5, 6, 7, 8, 9. Using these symbols as digits of a number, we can express any quantity. The
decimal system is also called the base-10 system because it has 10 digits.
Binary number system :
In the binary system, there are only two symbols or possible digit values, 0 and 1. This base-2
system can be used to represent any quantity that can be represented in decimal or other base
system
Octal number system :
The octal number system has a base of eight, meaning that it has eight possible digits:
0,1,2,3,4,5,6,7. The octal numbering system includes eight base digits (0-7).After 7, the next
placeholder to the right begins with a “1”
i.e 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...
Hexadecimal number system:
The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0
through 9 plus the letters A, B, C, D, E, and F ,to represent 10 through 16, as the 16 digit
symbols
Digits = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
Rohith.S, Asst. Professor, NCET, Bangalore

Page 1
Basic Electronics Notes

Number system

Conversion of number systems.
Converting from one number system to another is called conversion of number system or code
conversion, like converting from binary to decimal or converting from hexadecimal to decimal
etc.
Procedure for Conversion from One Number system to Other Number systems
Number
system Number
Procedure
(From)
system (To)
 Multiply each bit by 2n, where n is the “weight” of the bit
Binary
Decimal


Hexadecimal

Add the results
Group every 4 bits and represent it into Hexadecimal using table



Group every 3 bit and Represent it into octal using table

Binary




Divide by two, keep track of the remainder
Group the remainders from Bottom to Top

Hexadecimal



Repeated division by 16 and Keep track of the Reminder.

Octal



Repeated division by 8 and Keep track of the Reminder.

Binary



Represent each digit by group of 3 bits as given in table

Decimal



Multiply each digit by 8n, where n is the “weight” of the bit



The weight is the position of the bit, starting from 0 on the right



Add the results



Convert Octal to Binary first.



Regroup the binary number by four bits per group starting from
LSB



Use the table to represent the digit

Binary



Represent each digit by group of 4 bits

Decimal



Multiply each bit by 16n, where n is the “weight” of the bit



The weight is the position of the bit, starting from 0 on the right



Add the results



Convert Hexadecimal to Binary first.



Regroup the binary number by three bits per group starting from
LSB.



Octal




Octal
Decimal

The weight is the position of the bit, starting from 0 on the right

Use the table to represent the digit

Hexadecimal

Hexadecimal

Octal

Rohith.S, Asst. Professor, NCET, Bangalore

Page 2
Basic Electronics Notes

Octal –To- Binary / Binary- To- Octal Conversion
Octal
0
1
2
3
Digit
Binary
000
001
010
011
Equivalent

Number system

4

5

6

7

100

101

110

111

5

6

7

0101

0110

0111

D

E

F

1101

1110

1111

Binary-To-Hexadecimal /Hexadecimal-To-Binary Conversion
Hexadecimal 0
1
2
3
4
Digit
Binary
0000
0001
0010
0011
0100
Equivalent
Hexadecimal 8
9
A
B
C
Digit
Binary
1000
1001
1010
1011
1100
Equivalent

Subtraction Using Number System
Complement method of subtraction
The complement method of subtraction is the method used for subtraction of numbers in
different number systems. This method is useful as it can easily implemented in arithmetic logic
circuits and inverting circuits in computers.
The complement method used in various no. systems discussed above is indicated below:
For decimal system – 9‘s complement method
– 10‘s complement method
For binary system

– 1‘s complement method
-- 2‘s complement method

For octal system

– 7‘s complement method
– 8‘s complement method

For hexadecimal system – 15‘s complement method
– 16‘s complement method
For subtraction of two numbers we have two cases :
1 Subtraction of smaller number from larger number
2 Subtraction of larger number from smaller number
Subtraction Using Binary no. System
The 1‘s complement of a given binary no. is the new no. obtained by changing all the 0‘
to 1, and all 0‘s to 1
Ex : 11010‘s 1‘s complement is 00101
Rohith.S, Asst. Professor, NCET, Bangalore

Page 3
Basic Electronics Notes

Number system

The 2‘s complement of a given binary no. is the new no. obtained by changing all the 0‘
to 1, and all 0‘s to 1 and then adding 1 to the least significant it
Ex : 11010‘s 2‘s complement is 1‘s complement 00101+1=00110
1’s complement method of subtraction
Subtraction of smaller number from larger number
1. Determine the 1‘s complement of the smaller no.
2. Add the first complement to the larger no.
3. Remove the carry and add it to the result. This is called end-around carry.
Subtraction of larger number from smaller number
1. Determine the first complement of the larger no.
2. Add the first complement to the smaller no.
3. Answer is in the 1‘s complement form. To get the answer in true form take the 1‘s
complement and assign –ve sign to the answer.
Advantages of 1’s complement method
1. The first complement subtraction can be accomplished with a binary adder. Therefore,
this method is useful in arithmetic logic circuits.
2. The first complement of a no. is easily obtained by inverting each bit in the no.
2’s complement method of subtraction
Subtraction of smaller number from larger number
1. Determine the 2‘s complement of a smaller no.
2. Add the 2‘s complement to the larger no.
3. Discard the carry.
Subtraction of larger number from smaller number
1. Determine the 2‘s complement of a larger no.
2. Add the 2‘s complement to the smaller no.
3. When there is no carry, answer is in the 2‘s complement form. To get the answer in
the true form take the 2‘s complement and assign –ve sign to the answer
Complement method of subtraction for octal number
7’s complement method of subtraction
The 7‘s complement of an octal no. is found by subtracting each digit from 7
Subtraction of smaller no. from larger no.
Step1 :Find 7‘s complement of subtrahend
Step2: Add two octal numbers (first no. and 7‘s complement of the second no.)
Step3 : I f the carry is produced in addition, add the carry to the least significant bit of the
sum, otherwise find 7‘s complement of the sum and attach –ve sign to it.
Rohith.S, Asst. Professor, NCET, Bangalore

Page 4
Basic Electronics Notes

Number system

Subtraction of larger number from smaller number
Step1 :Find 7‘s complement of subtrahend
Step2: Add two octal numbers (first no. and 7‘s complement of the second no.)
Step3 : I f the carry is not produced in addition then, find 7‘s complement of the sum as a
result and attach –ve sign to the result.
8’s complement method of subtraction
The 8‘s complement of an octal number is found by adding a 1 to the least significant bit of the
7‘s complement of an octal no.
Subtraction of smaller no. from larger no.
The steps for octal subtraction using 8‘s complement method are as given below
Step 1. Find 8‘s complement of subtrahend
Step 2 : Add two octal numbers (first no. and 8‘s complement of second no.)
Step 3 : If carry is produced in the addition, it is discarded., otherwise find 8‘s
complement of the sum as the result with –ve sign.
Subtraction of larger no. from smaller no.
Steps for Octal subtraction using 8‘s complement are as given below :
Step 1 : Find 8‘s complement of subtrahend
Step 2 : Add two Octal numbers (first no. and 8‘s complement of second no.)
Step 3 : If carry is produced in the addition, it is discarded, otherwise find 8‘s
complement of the sum as a result, with a –ve sign.
9’s complement method of subtraction
The 9‘s complement of a decimal no. is found by subtracting each digit from 9.
Subtraction of smaller no. from larger no.
Step 1 : Find 9‘s complement of subtrahend
Step 2 : Add two decimal numbers (first no. and 9‘s complement of second no.)
Step 3 : If carry is produced in the addition, add carry to the least significant bit of the
sum, otherwise find 9‘s complement of the sum as a result with a –ve sign.
Subtraction of larger no. from smaller no.
Step 1 : Find 9‘s complement of subtrahend
Step 2 : Add two hexadecimal numbers (first no. and 9‘s complement of second no.)
Step 3 : If carry is produced in the addition, add carry to the least significant bit of the
sum, otherwise find 9‘s complement of the sum and attach –ve sign to it.
10’s complement method of subtraction
The 10‘s complement of a Decimal no. is found by adding a 1 to the least significant bit of the
9‘s complement of a decimal no.
Subtraction of smaller no. from larger no.
Steps for Decimal subtraction using 10‘s complement are as given below :
Step 1 : Find 10‘s complement of subtrahend.
Step 2 : Add two decimal numbers (first no. and 10‘s complement of second no.)
Rohith.S, Asst. Professor, NCET, Bangalore

Page 5
Basic Electronics Notes

Number system

Step 3 : If carry is produced in the addition, it is discarded, otherwise find 10‘s
complement of the sum as a result, with a –ve sign.
Subtraction of larger no. from smaller no.
Steps for Decimal subtraction using 10‘s complement are as given below :
Step 1 : Find 10‘s complement of subtrahend
Step 2 : Add two Decimal numbers (first no. and 10‘s complement of second no.)
Step3 : If carry is produced in the addition, it is discarded, otherwise find 10‘s
complement of the sum as a result, with a –ve sign.
Complement method of subtraction for Hexadecimal number
15’s complement method of subtraction
The 15‘s complement of a hexadecimal no. is found by subtracting each digit from 15.
Subtraction of smaller no. from larger no.
Step 1 : Find 15‘s complement of subtrahend
Step 2 : Add two hexadecimal numbers (first no. and 15‘s complement of second no.)
Step 3 : If carry is produced in the addition, add carry to the least significant bit of the
sum, otherwise find 15‘s complement of the sum as a result with a –ve sign.
Subtraction of larger no. from smaller no.
Step 1 : Find 15‘s complement of subtrahend
Step 2 : Add two hexadecimal numbers (first no. and 15‘s complement of second no.)
Step 3 : If carry is produced in the addition, add carry to the least significant bit of the
sum, otherwise find 15‘s complement of the sum and attach –ve sign to it.
16’s complement method of subtraction
The 16‘s complement of a hexadecimal no. is found by adding a 1 to the least significant bit of
the 15‘s complement of a hexadecimal no.
Subtraction of smaller no. from larger no.
Steps for Hexadecimal subtraction using 16‘s complement are as given below :
Step 1 : Find 16‘s complement of subtrahend.
Step 2 : Add two hexadecimal numbers (first no. and 16‘s complement of second no.)
Step3 : If carry is produced in the addition, it is discarded, otherwise find 16‘s
complement of the sum as a result, with a –ve sign.
Subtraction of larger no. from smaller no.
Steps for Hexadecimal subtraction using 16‘s complement are as given below :
Step 1 : Find 16‘s complement of subtrahend
Step 2 : Add two hexadecimal numbers (first no. and 16‘s complement of second no.)
Step 3 : If carry is produced in the addition, it is discarded, otherwise find 16‘s
complement of the sum as a result, with a –ve sign
Binary Coded Decimal Numbers - BCD

Rohith.S, Asst. Professor, NCET, Bangalore

Page 6
Basic Electronics Notes

Number system

BCD is an abbreviation for binary coded decimal. BCD is a numeric code in which each digit
of a decimal number is represented by a separate group of bits. The most common BCD code is 8-42-1 BCD, in which each decimal digit is represented by a 4 bit binary number. It is called 8-4-2-1
BCD because the weights associated from right to left are 1-2-4-8.
The table below shows decimal digit and its corresponding code.

Decimal Number

Binary Number
(8421)

1

0001

2
3

0010
0011

4
5

0100
0101

6

0110

7
8

0111
1000

9

1001

The advantage of BCD is that it is easy to convert between it and decimal. The disadvantage
is the arithmetic operations are more complex when compared to binary.
BCD ADDITION
The addition of two BCD nos. can be best understood by considering the following three conditions :
Case1: The sum equals 9 or less with no carry
Case2: The sum equals greater than 9 with no carry
Case3: The sum equals 9 or less with a carry
Case1: The sum equals 9 or less with no carry
Take two numbers 6 and 3 in BCD and add
5 ----- 0101
4 ----- 0100
--------------------9 ----- 1001 The addition is carried out as in normal binary addition and the sum is 1001 which is a
BCD code for 9.
Case2: The sum equals greater than 9 with no carry
Let us consider addition of the numbers 6 and 8 in BCD
6 ----- 0110
8 ----- 1000
--------------------14 ---- 1110 invalid BCD number. This has occurred because the sum of the two digits
exceeds 9. In this case to correct the situation add 6 in BCD i.e 0110 to the invalid BCD no. as shown
below.
Rohith.S, Asst. Professor, NCET, Bangalore

Page 7
Basic Electronics Notes

Number system

6 ----- 0110
8 ----- 1000
--------------------14----- 1110
0110
----------------0001 0100
Observe that after addition of 6 a carry is produced into the second decimal position.
Case3: The sum equals 9 or less with a carry
Let us consider addition of the numbers 8 and 9 in BCD
8 ----- 1000
9 ------1001
--------------------17 0001 0001 In correct BCD No.
0110 Add 6 for correction
--------------------------0001 0111 BCD for 17
BCD Subtraction
A negative BCD no. can be expressed by taking 9‘s complement or 10‘s complement. The9‘s
complement of a decimal number is found by subtracting each digit in the number by 9.The 10‘s
complement is 9‘s complement +1.
Decimal
Number
0
1
2
3
4
5
6
7
8
9

9’s complement
9
8
7
6
5
4
3
2
1
0

10’s
complement
0
9
8
7
6
5
4
3
2
1

Subtraction as follows :
 Find the 9‘s or 10‘s complement of a negative no.
 Add the two numbers using BCD addition
 If carry is generated add carry to the result treating it as end around carry, if it is 9‘s
complement subtraction, discard the carry if it is 10‘s complement. If there is no carry
generated take corresponding 9‘s or 10‘s complement of the result and attach –ve sign to the
result.

Rohith.S, Asst. Professor, NCET, Bangalore

Page 8

Más contenido relacionado

La actualidad más candente

Complements of numbers
Complements of numbersComplements of numbers
Complements of numbersKiriti Varkur
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rulesstudent
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesDr. Anita Goel
 
1sand2scomplement r004
1sand2scomplement  r0041sand2scomplement  r004
1sand2scomplement r004arunachalamr16
 
Number system arithmetic
Number system arithmetic Number system arithmetic
Number system arithmetic renatus katundu
 
Number systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s compNumber systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s compmrlee2014
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004arunachalamr16
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representationgavhays
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number SystemDebarati Das
 
Representation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarRepresentation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarSivakumar R D .
 
Complement in DLD
Complement in DLDComplement in DLD
Complement in DLDshahzad ali
 

La actualidad más candente (20)

Complements
ComplementsComplements
Complements
 
Complements of numbers
Complements of numbersComplements of numbers
Complements of numbers
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
1sand2scomplement r004
1sand2scomplement  r0041sand2scomplement  r004
1sand2scomplement r004
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Number system arithmetic
Number system arithmetic Number system arithmetic
Number system arithmetic
 
Number systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s compNumber systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s comp
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
compliments
 compliments compliments
compliments
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
 
Representation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarRepresentation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.Sivakumar
 
Complement in DLD
Complement in DLDComplement in DLD
Complement in DLD
 
Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
 

Destacado

Heat treatment part 1
Heat treatment part 1Heat treatment part 1
Heat treatment part 1Naman Dave
 
Number system
Number systemNumber system
Number systemSajib
 
3.3 Gas pressure & Atmospheric Pressure
3.3 Gas pressure & Atmospheric Pressure3.3 Gas pressure & Atmospheric Pressure
3.3 Gas pressure & Atmospheric PressureNur Farizan
 
Heat treatment part 2
Heat treatment part 2Heat treatment part 2
Heat treatment part 2Naman Dave
 
Pressure measurement
Pressure measurementPressure measurement
Pressure measurementbkdevaraj
 
fluid mechanics- pressure measurement
fluid mechanics- pressure measurementfluid mechanics- pressure measurement
fluid mechanics- pressure measurementAnkitendran Mishra
 
Heat treatment(Muda Ibrahim)
Heat treatment(Muda Ibrahim)Heat treatment(Muda Ibrahim)
Heat treatment(Muda Ibrahim)Muda Ibrahim
 
number system school ppt ninth class
number system school ppt ninth classnumber system school ppt ninth class
number system school ppt ninth classManan Jain
 
Computer number systems
Computer number systemsComputer number systems
Computer number systemsRevi Shahini
 
Number System
Number SystemNumber System
Number Systemitutor
 
Heat treatment processes
Heat treatment processesHeat treatment processes
Heat treatment processesKartik Thakkar
 
number system
number systemnumber system
number systemvirly dwe
 
Annealing , normalizing , quenching , martensitic transformation (1)
Annealing , normalizing , quenching , martensitic transformation (1)Annealing , normalizing , quenching , martensitic transformation (1)
Annealing , normalizing , quenching , martensitic transformation (1)thiru1mech
 

Destacado (20)

fluid statics
fluid staticsfluid statics
fluid statics
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Chap5
Chap5Chap5
Chap5
 
Heat treatment part 1
Heat treatment part 1Heat treatment part 1
Heat treatment part 1
 
Number system
Number systemNumber system
Number system
 
3.3 Gas pressure & Atmospheric Pressure
3.3 Gas pressure & Atmospheric Pressure3.3 Gas pressure & Atmospheric Pressure
3.3 Gas pressure & Atmospheric Pressure
 
Heat treatment part 2
Heat treatment part 2Heat treatment part 2
Heat treatment part 2
 
Pressure measurement
Pressure measurement Pressure measurement
Pressure measurement
 
Number system
Number systemNumber system
Number system
 
Pressure measurement
Pressure measurementPressure measurement
Pressure measurement
 
fluid mechanics- pressure measurement
fluid mechanics- pressure measurementfluid mechanics- pressure measurement
fluid mechanics- pressure measurement
 
Heat treatment(Muda Ibrahim)
Heat treatment(Muda Ibrahim)Heat treatment(Muda Ibrahim)
Heat treatment(Muda Ibrahim)
 
number system school ppt ninth class
number system school ppt ninth classnumber system school ppt ninth class
number system school ppt ninth class
 
Computer number systems
Computer number systemsComputer number systems
Computer number systems
 
Number System
Number SystemNumber System
Number System
 
Friction, types of friction and different laws of friction
Friction, types of friction and different laws of frictionFriction, types of friction and different laws of friction
Friction, types of friction and different laws of friction
 
Heat treatment processes
Heat treatment processesHeat treatment processes
Heat treatment processes
 
Number system
Number systemNumber system
Number system
 
number system
number systemnumber system
number system
 
Annealing , normalizing , quenching , martensitic transformation (1)
Annealing , normalizing , quenching , martensitic transformation (1)Annealing , normalizing , quenching , martensitic transformation (1)
Annealing , normalizing , quenching , martensitic transformation (1)
 

Similar a Chapter 7 rohith

Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.Ritesh Saini
 
Data representation
Data representationData representation
Data representationManish Kumar
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental Aman anand kumar
 
Number system....
Number system....Number system....
Number system....mshoaib15
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.pptzorogoh2
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemISMT College
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number Systemkclove
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02muhammadsarab
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversionRam Pratap Singh
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16John Todora
 
Physics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesPhysics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesbiswanath dehuri
 

Similar a Chapter 7 rohith (20)

NUMBER SYSTEM.pptx
NUMBER  SYSTEM.pptxNUMBER  SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Data representation
Data representationData representation
Data representation
 
1 Number System.pdf
1 Number System.pdf1 Number System.pdf
1 Number System.pdf
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
Number system....
Number system....Number system....
Number system....
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
 
Number system
Number systemNumber system
Number system
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number System
 
Number+system (1)
Number+system (1)Number+system (1)
Number+system (1)
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02
 
Ch 4
Ch 4Ch 4
Ch 4
 
Number System and Boolean Algebra
Number System and Boolean AlgebraNumber System and Boolean Algebra
Number System and Boolean Algebra
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16
 
Physics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesPhysics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gates
 
Number System
Number SystemNumber System
Number System
 

Último

Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxheathfieldcps1
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17Celine George
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 

Último (20)

Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 

Chapter 7 rohith

  • 1. Basic Electronics Notes Number system UNIT-VII Syllabus 1. NUMBER SYSTEMS: Introduction, decimal system, Binary, Octal and Hexadecimal number systems, addition and subtraction, fractional number, Binary Coded Decimal numbers. NUMBER SYSTEM The human need to count things goes back to the dawn of civilization. To answer the questions like how much or how many‖, people invented number system. A number system is any scheme used to count things. The decimal number system succeeded because very large numbers can be expressed using relatively short series of easily memorized numerals. Decimal or base 10 number system‘s origin: can be traced to, counting on the fingers with digits. In any number system, the important term is Base or radix Base: Base is the number of different digits or symbols or numerals used to represent the number system including zero in the number system. It is also called the radix of the number system. Commonly used number systems : 1. Decimal 2. Binary 3. Octal 4. Hexadecimal. Decimal number system : The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Using these symbols as digits of a number, we can express any quantity. The decimal system is also called the base-10 system because it has 10 digits. Binary number system : In the binary system, there are only two symbols or possible digit values, 0 and 1. This base-2 system can be used to represent any quantity that can be represented in decimal or other base system Octal number system : The octal number system has a base of eight, meaning that it has eight possible digits: 0,1,2,3,4,5,6,7. The octal numbering system includes eight base digits (0-7).After 7, the next placeholder to the right begins with a “1” i.e 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ... Hexadecimal number system: The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E, and F ,to represent 10 through 16, as the 16 digit symbols Digits = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} Rohith.S, Asst. Professor, NCET, Bangalore Page 1
  • 2. Basic Electronics Notes Number system Conversion of number systems. Converting from one number system to another is called conversion of number system or code conversion, like converting from binary to decimal or converting from hexadecimal to decimal etc. Procedure for Conversion from One Number system to Other Number systems Number system Number Procedure (From) system (To)  Multiply each bit by 2n, where n is the “weight” of the bit Binary Decimal  Hexadecimal Add the results Group every 4 bits and represent it into Hexadecimal using table  Group every 3 bit and Represent it into octal using table Binary   Divide by two, keep track of the remainder Group the remainders from Bottom to Top Hexadecimal  Repeated division by 16 and Keep track of the Reminder. Octal  Repeated division by 8 and Keep track of the Reminder. Binary  Represent each digit by group of 3 bits as given in table Decimal  Multiply each digit by 8n, where n is the “weight” of the bit  The weight is the position of the bit, starting from 0 on the right  Add the results  Convert Octal to Binary first.  Regroup the binary number by four bits per group starting from LSB  Use the table to represent the digit Binary  Represent each digit by group of 4 bits Decimal  Multiply each bit by 16n, where n is the “weight” of the bit  The weight is the position of the bit, starting from 0 on the right  Add the results  Convert Hexadecimal to Binary first.  Regroup the binary number by three bits per group starting from LSB.  Octal   Octal Decimal The weight is the position of the bit, starting from 0 on the right Use the table to represent the digit Hexadecimal Hexadecimal Octal Rohith.S, Asst. Professor, NCET, Bangalore Page 2
  • 3. Basic Electronics Notes Octal –To- Binary / Binary- To- Octal Conversion Octal 0 1 2 3 Digit Binary 000 001 010 011 Equivalent Number system 4 5 6 7 100 101 110 111 5 6 7 0101 0110 0111 D E F 1101 1110 1111 Binary-To-Hexadecimal /Hexadecimal-To-Binary Conversion Hexadecimal 0 1 2 3 4 Digit Binary 0000 0001 0010 0011 0100 Equivalent Hexadecimal 8 9 A B C Digit Binary 1000 1001 1010 1011 1100 Equivalent Subtraction Using Number System Complement method of subtraction The complement method of subtraction is the method used for subtraction of numbers in different number systems. This method is useful as it can easily implemented in arithmetic logic circuits and inverting circuits in computers. The complement method used in various no. systems discussed above is indicated below: For decimal system – 9‘s complement method – 10‘s complement method For binary system – 1‘s complement method -- 2‘s complement method For octal system – 7‘s complement method – 8‘s complement method For hexadecimal system – 15‘s complement method – 16‘s complement method For subtraction of two numbers we have two cases : 1 Subtraction of smaller number from larger number 2 Subtraction of larger number from smaller number Subtraction Using Binary no. System The 1‘s complement of a given binary no. is the new no. obtained by changing all the 0‘ to 1, and all 0‘s to 1 Ex : 11010‘s 1‘s complement is 00101 Rohith.S, Asst. Professor, NCET, Bangalore Page 3
  • 4. Basic Electronics Notes Number system The 2‘s complement of a given binary no. is the new no. obtained by changing all the 0‘ to 1, and all 0‘s to 1 and then adding 1 to the least significant it Ex : 11010‘s 2‘s complement is 1‘s complement 00101+1=00110 1’s complement method of subtraction Subtraction of smaller number from larger number 1. Determine the 1‘s complement of the smaller no. 2. Add the first complement to the larger no. 3. Remove the carry and add it to the result. This is called end-around carry. Subtraction of larger number from smaller number 1. Determine the first complement of the larger no. 2. Add the first complement to the smaller no. 3. Answer is in the 1‘s complement form. To get the answer in true form take the 1‘s complement and assign –ve sign to the answer. Advantages of 1’s complement method 1. The first complement subtraction can be accomplished with a binary adder. Therefore, this method is useful in arithmetic logic circuits. 2. The first complement of a no. is easily obtained by inverting each bit in the no. 2’s complement method of subtraction Subtraction of smaller number from larger number 1. Determine the 2‘s complement of a smaller no. 2. Add the 2‘s complement to the larger no. 3. Discard the carry. Subtraction of larger number from smaller number 1. Determine the 2‘s complement of a larger no. 2. Add the 2‘s complement to the smaller no. 3. When there is no carry, answer is in the 2‘s complement form. To get the answer in the true form take the 2‘s complement and assign –ve sign to the answer Complement method of subtraction for octal number 7’s complement method of subtraction The 7‘s complement of an octal no. is found by subtracting each digit from 7 Subtraction of smaller no. from larger no. Step1 :Find 7‘s complement of subtrahend Step2: Add two octal numbers (first no. and 7‘s complement of the second no.) Step3 : I f the carry is produced in addition, add the carry to the least significant bit of the sum, otherwise find 7‘s complement of the sum and attach –ve sign to it. Rohith.S, Asst. Professor, NCET, Bangalore Page 4
  • 5. Basic Electronics Notes Number system Subtraction of larger number from smaller number Step1 :Find 7‘s complement of subtrahend Step2: Add two octal numbers (first no. and 7‘s complement of the second no.) Step3 : I f the carry is not produced in addition then, find 7‘s complement of the sum as a result and attach –ve sign to the result. 8’s complement method of subtraction The 8‘s complement of an octal number is found by adding a 1 to the least significant bit of the 7‘s complement of an octal no. Subtraction of smaller no. from larger no. The steps for octal subtraction using 8‘s complement method are as given below Step 1. Find 8‘s complement of subtrahend Step 2 : Add two octal numbers (first no. and 8‘s complement of second no.) Step 3 : If carry is produced in the addition, it is discarded., otherwise find 8‘s complement of the sum as the result with –ve sign. Subtraction of larger no. from smaller no. Steps for Octal subtraction using 8‘s complement are as given below : Step 1 : Find 8‘s complement of subtrahend Step 2 : Add two Octal numbers (first no. and 8‘s complement of second no.) Step 3 : If carry is produced in the addition, it is discarded, otherwise find 8‘s complement of the sum as a result, with a –ve sign. 9’s complement method of subtraction The 9‘s complement of a decimal no. is found by subtracting each digit from 9. Subtraction of smaller no. from larger no. Step 1 : Find 9‘s complement of subtrahend Step 2 : Add two decimal numbers (first no. and 9‘s complement of second no.) Step 3 : If carry is produced in the addition, add carry to the least significant bit of the sum, otherwise find 9‘s complement of the sum as a result with a –ve sign. Subtraction of larger no. from smaller no. Step 1 : Find 9‘s complement of subtrahend Step 2 : Add two hexadecimal numbers (first no. and 9‘s complement of second no.) Step 3 : If carry is produced in the addition, add carry to the least significant bit of the sum, otherwise find 9‘s complement of the sum and attach –ve sign to it. 10’s complement method of subtraction The 10‘s complement of a Decimal no. is found by adding a 1 to the least significant bit of the 9‘s complement of a decimal no. Subtraction of smaller no. from larger no. Steps for Decimal subtraction using 10‘s complement are as given below : Step 1 : Find 10‘s complement of subtrahend. Step 2 : Add two decimal numbers (first no. and 10‘s complement of second no.) Rohith.S, Asst. Professor, NCET, Bangalore Page 5
  • 6. Basic Electronics Notes Number system Step 3 : If carry is produced in the addition, it is discarded, otherwise find 10‘s complement of the sum as a result, with a –ve sign. Subtraction of larger no. from smaller no. Steps for Decimal subtraction using 10‘s complement are as given below : Step 1 : Find 10‘s complement of subtrahend Step 2 : Add two Decimal numbers (first no. and 10‘s complement of second no.) Step3 : If carry is produced in the addition, it is discarded, otherwise find 10‘s complement of the sum as a result, with a –ve sign. Complement method of subtraction for Hexadecimal number 15’s complement method of subtraction The 15‘s complement of a hexadecimal no. is found by subtracting each digit from 15. Subtraction of smaller no. from larger no. Step 1 : Find 15‘s complement of subtrahend Step 2 : Add two hexadecimal numbers (first no. and 15‘s complement of second no.) Step 3 : If carry is produced in the addition, add carry to the least significant bit of the sum, otherwise find 15‘s complement of the sum as a result with a –ve sign. Subtraction of larger no. from smaller no. Step 1 : Find 15‘s complement of subtrahend Step 2 : Add two hexadecimal numbers (first no. and 15‘s complement of second no.) Step 3 : If carry is produced in the addition, add carry to the least significant bit of the sum, otherwise find 15‘s complement of the sum and attach –ve sign to it. 16’s complement method of subtraction The 16‘s complement of a hexadecimal no. is found by adding a 1 to the least significant bit of the 15‘s complement of a hexadecimal no. Subtraction of smaller no. from larger no. Steps for Hexadecimal subtraction using 16‘s complement are as given below : Step 1 : Find 16‘s complement of subtrahend. Step 2 : Add two hexadecimal numbers (first no. and 16‘s complement of second no.) Step3 : If carry is produced in the addition, it is discarded, otherwise find 16‘s complement of the sum as a result, with a –ve sign. Subtraction of larger no. from smaller no. Steps for Hexadecimal subtraction using 16‘s complement are as given below : Step 1 : Find 16‘s complement of subtrahend Step 2 : Add two hexadecimal numbers (first no. and 16‘s complement of second no.) Step 3 : If carry is produced in the addition, it is discarded, otherwise find 16‘s complement of the sum as a result, with a –ve sign Binary Coded Decimal Numbers - BCD Rohith.S, Asst. Professor, NCET, Bangalore Page 6
  • 7. Basic Electronics Notes Number system BCD is an abbreviation for binary coded decimal. BCD is a numeric code in which each digit of a decimal number is represented by a separate group of bits. The most common BCD code is 8-42-1 BCD, in which each decimal digit is represented by a 4 bit binary number. It is called 8-4-2-1 BCD because the weights associated from right to left are 1-2-4-8. The table below shows decimal digit and its corresponding code. Decimal Number Binary Number (8421) 1 0001 2 3 0010 0011 4 5 0100 0101 6 0110 7 8 0111 1000 9 1001 The advantage of BCD is that it is easy to convert between it and decimal. The disadvantage is the arithmetic operations are more complex when compared to binary. BCD ADDITION The addition of two BCD nos. can be best understood by considering the following three conditions : Case1: The sum equals 9 or less with no carry Case2: The sum equals greater than 9 with no carry Case3: The sum equals 9 or less with a carry Case1: The sum equals 9 or less with no carry Take two numbers 6 and 3 in BCD and add 5 ----- 0101 4 ----- 0100 --------------------9 ----- 1001 The addition is carried out as in normal binary addition and the sum is 1001 which is a BCD code for 9. Case2: The sum equals greater than 9 with no carry Let us consider addition of the numbers 6 and 8 in BCD 6 ----- 0110 8 ----- 1000 --------------------14 ---- 1110 invalid BCD number. This has occurred because the sum of the two digits exceeds 9. In this case to correct the situation add 6 in BCD i.e 0110 to the invalid BCD no. as shown below. Rohith.S, Asst. Professor, NCET, Bangalore Page 7
  • 8. Basic Electronics Notes Number system 6 ----- 0110 8 ----- 1000 --------------------14----- 1110 0110 ----------------0001 0100 Observe that after addition of 6 a carry is produced into the second decimal position. Case3: The sum equals 9 or less with a carry Let us consider addition of the numbers 8 and 9 in BCD 8 ----- 1000 9 ------1001 --------------------17 0001 0001 In correct BCD No. 0110 Add 6 for correction --------------------------0001 0111 BCD for 17 BCD Subtraction A negative BCD no. can be expressed by taking 9‘s complement or 10‘s complement. The9‘s complement of a decimal number is found by subtracting each digit in the number by 9.The 10‘s complement is 9‘s complement +1. Decimal Number 0 1 2 3 4 5 6 7 8 9 9’s complement 9 8 7 6 5 4 3 2 1 0 10’s complement 0 9 8 7 6 5 4 3 2 1 Subtraction as follows :  Find the 9‘s or 10‘s complement of a negative no.  Add the two numbers using BCD addition  If carry is generated add carry to the result treating it as end around carry, if it is 9‘s complement subtraction, discard the carry if it is 10‘s complement. If there is no carry generated take corresponding 9‘s or 10‘s complement of the result and attach –ve sign to the result. Rohith.S, Asst. Professor, NCET, Bangalore Page 8