SlideShare a Scribd company logo
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

More Related Content

What's hot

Complements
ComplementsComplements
Complements
Sudheesh S Madhav
 
Complements of numbers
Complements of numbersComplements of numbers
Complements of numbers
Kiriti Varkur
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
student
 
Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
Asst Lect Mohammed Salim
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
Dr. Anita Goel
 
1sand2scomplement r004
1sand2scomplement  r0041sand2scomplement  r004
1sand2scomplement r004
arunachalamr16
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
Elizabeth de Leon Aler
 
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 comp
mrlee2014
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
Forrester High School
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
Meenakshi Paul
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004
arunachalamr16
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Chamila Fernando
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
Janki Shah
 
compliments
 compliments compliments
compliments
Unsa Shakir
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
gavhays
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
Debarati 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.Sivakumar
Sivakumar R D .
 
Complement in DLD
Complement in DLDComplement in DLD
Complement in DLD
shahzad ali
 
Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
sudarmani rajagopal
 

What's hot (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
 

Viewers also liked

fluid statics
fluid staticsfluid statics
fluid statics
Mahesh Bajariya
 
Number Systems
Number SystemsNumber Systems
Number Systems
Sangita Panchal
 
Chap5
Chap5Chap5
Chap5
apwazap777
 
Heat treatment part 1
Heat treatment part 1Heat treatment part 1
Heat treatment part 1
Naman Dave
 
Number system
Number systemNumber system
Number system
Sajib
 
3.3 Gas pressure & Atmospheric Pressure
3.3 Gas pressure & Atmospheric Pressure3.3 Gas pressure & Atmospheric Pressure
3.3 Gas pressure & Atmospheric Pressure
Nur Farizan
 
Heat treatment part 2
Heat treatment part 2Heat treatment part 2
Heat treatment part 2
Naman Dave
 
Pressure measurement
Pressure measurement Pressure measurement
Pressure measurement
Uttam Trasadiya
 
Number system
Number systemNumber system
Number system
samypanch1234
 
Pressure measurement
Pressure measurementPressure measurement
Pressure measurement
bkdevaraj
 
fluid mechanics- pressure measurement
fluid mechanics- pressure measurementfluid mechanics- pressure measurement
fluid mechanics- pressure measurement
Ankitendran 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 class
Manan Jain
 
Computer number systems
Computer number systemsComputer number systems
Computer number systems
Revi Shahini
 
Number System
Number SystemNumber System
Number System
itutor
 
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
Poornima Group of Institutions, Jaipur
 
Heat treatment processes
Heat treatment processesHeat treatment processes
Heat treatment processes
Kartik Thakkar
 
Number system
Number systemNumber system
Number system
Palash Sachan
 
number system
number systemnumber system
number system
virly 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
 

Viewers also liked (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 to Chapter 7 rohith

NUMBER SYSTEM.pptx
NUMBER  SYSTEM.pptxNUMBER  SYSTEM.pptx
NUMBER SYSTEM.pptx
AsifRahaman16
 
Class 7 Cyber toolsComputer NUMBER SYSTEM
Class 7 Cyber toolsComputer NUMBER SYSTEMClass 7 Cyber toolsComputer NUMBER SYSTEM
Class 7 Cyber toolsComputer NUMBER SYSTEM
rajdeepstudycs10
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
Ritesh Saini
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
AnaMarieFrane
 
Data representation
Data representationData representation
Data representation
Manish 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
 
module 3,Boolean algebra and logic circuits .pptx
module 3,Boolean algebra and logic circuits .pptxmodule 3,Boolean algebra and logic circuits .pptx
module 3,Boolean algebra and logic circuits .pptx
keemjupiter
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
zorogoh2
 
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
ISMT College
 
Number system
Number systemNumber system
Number system
SAEED ULLAH JAN
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number System
kclove
 
Number+system (1)
Number+system (1)Number+system (1)
Number+system (1)
Bilal Maqbool ツ
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02
muhammadsarab
 
Ch 4
Ch 4Ch 4
Ch 4
nesaryyyy
 
Number System and Boolean Algebra
Number System and Boolean AlgebraNumber System and Boolean Algebra
Number System and Boolean Algebra
AMIE(I) Study Circle
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
Ram Pratap Singh
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Lovely Professional University
 
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
John 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 gates
biswanath dehuri
 

Similar to Chapter 7 rohith (20)

NUMBER SYSTEM.pptx
NUMBER  SYSTEM.pptxNUMBER  SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Class 7 Cyber toolsComputer NUMBER SYSTEM
Class 7 Cyber toolsComputer NUMBER SYSTEMClass 7 Cyber toolsComputer NUMBER SYSTEM
Class 7 Cyber toolsComputer NUMBER SYSTEM
 
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
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
Number system....
Number system....Number system....
Number system....
 
module 3,Boolean algebra and logic circuits .pptx
module 3,Boolean algebra and logic circuits .pptxmodule 3,Boolean algebra and logic circuits .pptx
module 3,Boolean algebra and logic circuits .pptx
 
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
 

Recently uploaded

IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 

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